{
 "cells": [
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## 分进合击复杂"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 17,
   "metadata": {},
   "outputs": [],
   "source": [
    "import pandas as pd"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 18,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th>data</th>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>zb</th>\n",
       "      <th>reg</th>\n",
       "      <th>sj</th>\n",
       "      <th></th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th rowspan=\"5\" valign=\"top\">A010101</th>\n",
       "      <th rowspan=\"5\" valign=\"top\">110000</th>\n",
       "      <th>2018</th>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2017</th>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2016</th>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2015</th>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2014</th>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>...</th>\n",
       "      <th>...</th>\n",
       "      <th>...</th>\n",
       "      <td>...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th rowspan=\"5\" valign=\"top\">A0S0B05</th>\n",
       "      <th rowspan=\"5\" valign=\"top\">650000</th>\n",
       "      <th>2013</th>\n",
       "      <td>33.856600</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2012</th>\n",
       "      <td>24.914044</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2011</th>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2010</th>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2009</th>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "<p>908300 rows × 1 columns</p>\n",
       "</div>"
      ],
      "text/plain": [
       "                          data\n",
       "zb      reg    sj             \n",
       "A010101 110000 2018        NaN\n",
       "               2017        NaN\n",
       "               2016        NaN\n",
       "               2015        NaN\n",
       "               2014        NaN\n",
       "...                        ...\n",
       "A0S0B05 650000 2013  33.856600\n",
       "               2012  24.914044\n",
       "               2011        NaN\n",
       "               2010        NaN\n",
       "               2009        NaN\n",
       "\n",
       "[908300 rows x 1 columns]"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "# A-0 国家数据库分省数据准备\n",
    "df_raw = pd.read_csv(\"fsnd_zb_data.tsv\", encoding=\"utf8\", sep=\"\\t\",\\\n",
    "                 keep_default_na=False, na_values='na_rep',index_col= [0,1,2])\n",
    "df_m = pd.read_csv(\"fsnd_zb_meta.tsv\", encoding=\"utf8\", sep=\"\\t\",\\\n",
    "                 keep_default_na=False, na_values='na_rep',index_col= [0])\n",
    "df_r = pd.read_csv(\"reg_treeId_level2.tsv\", encoding=\"utf8\", sep=\"\\t\",\\\n",
    "                 keep_default_na=False, na_values='na_rep')\n",
    "display(df_raw)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 19,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "(908300, 1)"
      ]
     },
     "execution_count": 19,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df_raw.shape"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## 创建指标字典"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 20,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>cname</th>\n",
       "      <th>dotcount</th>\n",
       "      <th>exp</th>\n",
       "      <th>ifshowcode</th>\n",
       "      <th>memo</th>\n",
       "      <th>name</th>\n",
       "      <th>nodesort</th>\n",
       "      <th>sortcode</th>\n",
       "      <th>tag</th>\n",
       "      <th>unit</th>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>code</th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>A010101</th>\n",
       "      <td>地级区划数</td>\n",
       "      <td>0</td>\n",
       "      <td>指地级行政单位即介于省级和县级之间的一级地方行政区域的个数，包括地区、自治州、行政区和盟。</td>\n",
       "      <td>False</td>\n",
       "      <td></td>\n",
       "      <td>地级区划数</td>\n",
       "      <td>1</td>\n",
       "      <td>2</td>\n",
       "      <td></td>\n",
       "      <td>个</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>A010102</th>\n",
       "      <td>地级市数</td>\n",
       "      <td>0</td>\n",
       "      <td>市是省、自治区内人口较集中，政治、经济、文化等方面较重要的城市。市人民政府为一级地方行政组织...</td>\n",
       "      <td>False</td>\n",
       "      <td></td>\n",
       "      <td>地级市数</td>\n",
       "      <td>1</td>\n",
       "      <td>3</td>\n",
       "      <td></td>\n",
       "      <td>个</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>A010103</th>\n",
       "      <td>县级区划数</td>\n",
       "      <td>0</td>\n",
       "      <td>县级行政单位指中国地方二级行政区域，是地方政权的基础。县级行政单位包括县、自治县、旗、自治旗...</td>\n",
       "      <td>False</td>\n",
       "      <td></td>\n",
       "      <td>县级区划数</td>\n",
       "      <td>1</td>\n",
       "      <td>4</td>\n",
       "      <td></td>\n",
       "      <td>个</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>A010104</th>\n",
       "      <td>市辖区数</td>\n",
       "      <td>0</td>\n",
       "      <td>市辖区（简称区）城市基层政权组织的行政区域。直辖市和较大的市多将市区范围划分为若干区，设立区...</td>\n",
       "      <td>False</td>\n",
       "      <td></td>\n",
       "      <td>市辖区数</td>\n",
       "      <td>1</td>\n",
       "      <td>5</td>\n",
       "      <td></td>\n",
       "      <td>个</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>A010105</th>\n",
       "      <td>县级市数</td>\n",
       "      <td>0</td>\n",
       "      <td>县级市是中国大陆行政区划名称，行政地位与县相同的县级行政区</td>\n",
       "      <td>False</td>\n",
       "      <td></td>\n",
       "      <td>县级市数</td>\n",
       "      <td>1</td>\n",
       "      <td>6</td>\n",
       "      <td></td>\n",
       "      <td>个</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "         cname  dotcount                                                exp  \\\n",
       "code                                                                          \n",
       "A010101  地级区划数         0      指地级行政单位即介于省级和县级之间的一级地方行政区域的个数，包括地区、自治州、行政区和盟。   \n",
       "A010102   地级市数         0  市是省、自治区内人口较集中，政治、经济、文化等方面较重要的城市。市人民政府为一级地方行政组织...   \n",
       "A010103  县级区划数         0  县级行政单位指中国地方二级行政区域，是地方政权的基础。县级行政单位包括县、自治县、旗、自治旗...   \n",
       "A010104   市辖区数         0  市辖区（简称区）城市基层政权组织的行政区域。直辖市和较大的市多将市区范围划分为若干区，设立区...   \n",
       "A010105   县级市数         0                      县级市是中国大陆行政区划名称，行政地位与县相同的县级行政区   \n",
       "\n",
       "         ifshowcode memo   name  nodesort  sortcode tag unit  \n",
       "code                                                          \n",
       "A010101       False       地级区划数         1         2        个  \n",
       "A010102       False        地级市数         1         3        个  \n",
       "A010103       False       县级区划数         1         4        个  \n",
       "A010104       False        市辖区数         1         5        个  \n",
       "A010105       False        县级市数         1         6        个  "
      ]
     },
     "execution_count": 20,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df_m.head()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 21,
   "metadata": {
    "scrolled": true
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "{'A010101': '地级区划数',\n",
       " 'A010102': '地级市数',\n",
       " 'A010103': '县级区划数',\n",
       " 'A010104': '市辖区数',\n",
       " 'A010105': '县级市数',\n",
       " 'A010106': '县数',\n",
       " 'A010107': '自治县数',\n",
       " 'A010108': '乡镇级区划数',\n",
       " 'A010109': '镇数',\n",
       " 'A01010A': '乡数',\n",
       " 'A01010B': '街道办事处',\n",
       " 'A010201': '三次产业法人单位数',\n",
       " 'A010202': '分机构类型法人单位数',\n",
       " 'A010203': '分行业法人单位数',\n",
       " 'A010301': '按控股情况分企业法人单位数',\n",
       " 'A010302': '按登记注册类型分企业法人单位数',\n",
       " 'A020101': '地区生产总值',\n",
       " 'A020102': '第一产业增加值',\n",
       " 'A020103': '第二产业增加值',\n",
       " 'A020104': '第三产业增加值',\n",
       " 'A020105': '农林牧渔业增加值',\n",
       " 'A020106': '工业增加值',\n",
       " 'A020107': '建筑业增加值',\n",
       " 'A020108': '批发和零售业增加值',\n",
       " 'A020109': '批发和零售贸易餐饮业增加值',\n",
       " 'A02010A': '交通运输、仓储和邮政业增加值',\n",
       " 'A02010B': '交通运输、仓储和邮电通信业增加值',\n",
       " 'A02010C': '住宿和餐饮业增加值',\n",
       " 'A02010D': '金融业增加值',\n",
       " 'A02010E': '房地产业增加值',\n",
       " 'A02010F': '其他行业增加值',\n",
       " 'A02010G': '人均地区生产总值',\n",
       " 'A020201': '地区生产总值指数(上年=100)',\n",
       " 'A020202': '第一产业增加值指数(上年=100)',\n",
       " 'A020203': '第二产业增加值指数(上年=100)',\n",
       " 'A020204': '第三产业增加值指数(上年=100)',\n",
       " 'A020301': '收入法生产总值',\n",
       " 'A020302': '劳动者报酬',\n",
       " 'A020303': '生产税净额',\n",
       " 'A020304': '固定资产折旧',\n",
       " 'A020305': '营业盈余',\n",
       " 'A020401': '支出法生产总值',\n",
       " 'A020402': '最终消费',\n",
       " 'A020403': '居民消费',\n",
       " 'A020404': '农村居民消费',\n",
       " 'A020405': '城镇居民消费',\n",
       " 'A020406': '政府消费',\n",
       " 'A020407': '资本形成总额',\n",
       " 'A020408': '固定资本形成总额',\n",
       " 'A020409': '存货增加',\n",
       " 'A02040A': '货物和服务净流出',\n",
       " 'A02040B': '最终消费率',\n",
       " 'A02040C': '资本形成率',\n",
       " 'A020501': '居民消费水平',\n",
       " 'A020502': '农村居民消费水平',\n",
       " 'A020503': '城镇居民消费水平',\n",
       " 'A020504': '居民消费水平指数(上年=100)',\n",
       " 'A020505': '农村居民消费水平指数(上年=100)',\n",
       " 'A020506': '城镇居民消费水平指数(上年=100)',\n",
       " 'A030101': '年末常住人口',\n",
       " 'A030102': '城镇人口',\n",
       " 'A030103': '乡村人口',\n",
       " 'A030201': '人口出生率',\n",
       " 'A030202': '人口死亡率',\n",
       " 'A030203': '人口自然增长率',\n",
       " 'A030301': '平均预期寿命',\n",
       " 'A030302': '男性平均预期寿命',\n",
       " 'A030303': '女性平均预期寿命',\n",
       " 'A030801': '人口数(人口抽样调查)',\n",
       " 'A030802': '户数、户人口及户规模(人口抽样调查)',\n",
       " 'A030803': '按户口登记状况分人口数(人口抽样调查)',\n",
       " 'A030804': '人口年龄构成和抚养比(人口抽样调查)',\n",
       " 'A030805': '按婚姻状况分人口数(人口抽样调查)',\n",
       " 'A030806': '按受教育程度分人口数(人口抽样调查)',\n",
       " 'A030807': '15岁及以上文盲人口(人口抽样调查)',\n",
       " 'A030808': '按家庭户规模分的户数(人口抽样调查)',\n",
       " 'A040101': '城镇单位就业人员',\n",
       " 'A040102': '农林牧渔业城镇单位就业人员',\n",
       " 'A040103': '采矿业城镇单位就业人员',\n",
       " 'A040104': '制造业城镇单位就业人员',\n",
       " 'A040105': '电力、燃气及水的生产和供应业城镇单位就业人员',\n",
       " 'A040106': '建筑业城镇单位就业人员',\n",
       " 'A040107': '交通运输、仓储及邮电通信业城镇单位就业人员',\n",
       " 'A040108': '信息传输、计算机服务和软件业城镇单位就业人员',\n",
       " 'A040109': '批发和零售业城镇单位就业人员',\n",
       " 'A04010A': '住宿和餐饮业城镇单位就业人员',\n",
       " 'A04010B': '金融业城镇单位就业人员',\n",
       " 'A04010C': '房地产业城镇单位就业人员',\n",
       " 'A04010D': '租赁和商务服务业城镇单位就业人员',\n",
       " 'A04010E': '科学研究、技术服务和地质勘查业城镇单位就业人员',\n",
       " 'A04010F': '水利、环境和公共设施管理业城镇单位就业人员',\n",
       " 'A04010G': '居民服务和其他服务业城镇单位就业人员',\n",
       " 'A04010H': '教育业城镇单位就业人员',\n",
       " 'A04010I': '卫生、社会保障和社会福利业城镇单位就业人员',\n",
       " 'A04010J': '文化、体育和娱乐业城镇单位就业人员',\n",
       " 'A04010K': '公共管理和社会组织城镇单位就业人员',\n",
       " 'A040201': '私营企业和个体就业人员',\n",
       " 'A040202': '制造业私营企业和个体就业人员',\n",
       " 'A040203': '建筑业私营企业和个体就业人员',\n",
       " 'A040204': '交通运输、仓储和邮政业私营企业和个体就业人员',\n",
       " 'A040205': '批发和零售业私营企业和个体就业人员',\n",
       " 'A040206': '住宿和餐饮业私营企业和个体就业人员',\n",
       " 'A040207': '租赁和商务服务业私营企业和个体就业人员',\n",
       " 'A040208': '居民服务和其他服务业私营企业和个体就业人员',\n",
       " 'A040301': '城镇私营企业和个体就业人员',\n",
       " 'A040302': '制造业城镇私营企业和个体就业人员',\n",
       " 'A040303': '建筑业城镇私营企业和个体就业人员',\n",
       " 'A040304': '交通运输、仓储和邮政业城镇私营企业和个体就业人员',\n",
       " 'A040305': '批发和零售业城镇私营企业和个体就业人员',\n",
       " 'A040306': '住宿和餐饮业城镇私营企业和个体就业人员',\n",
       " 'A040307': '租赁和商务服务业城镇私营企业和个体就业人员',\n",
       " 'A040308': '居民服务和其他服务业城镇私营企业和个体就业人员',\n",
       " 'A040401': '私营企业户数',\n",
       " 'A040402': '私营企业就业人数',\n",
       " 'A040403': '私营企业投资者就业人数',\n",
       " 'A040404': '城镇私营企业就业人数',\n",
       " 'A040405': '城镇私营企业投资者就业人数',\n",
       " 'A040406': '乡村私营企业就业人数',\n",
       " 'A040407': '乡村私营企业投资者就业人数',\n",
       " 'A040501': '个体户数',\n",
       " 'A040502': '个体就业人数',\n",
       " 'A040503': '城镇就业人数',\n",
       " 'A040504': '乡村个体就业人数',\n",
       " 'A040601': '城镇单位就业人员工资总额',\n",
       " 'A040602': '国有城镇单位就业人员工资总额',\n",
       " 'A040603': '城镇集体单位就业人员工资总额',\n",
       " 'A040604': '其他城镇单位就业人员工资总额',\n",
       " 'A040605': '城镇单位就业人员工资总额指数(上年=100)',\n",
       " 'A040606': '国有城镇单位就业人员工资总额指数(上年=100)',\n",
       " 'A040607': '城镇集体单位就业人员工资总额指数(上年=100)',\n",
       " 'A040608': '其他城镇单位就业人员工资总额指数(上年=100)',\n",
       " 'A040701': '城镇单位就业人员平均工资',\n",
       " 'A040702': '城镇单位在岗职工平均工资',\n",
       " 'A040703': '城镇国有单位就业人员平均工资',\n",
       " 'A040704': '城镇集体单位就业人员平均工资',\n",
       " 'A040705': '城镇其他单位就业人员平均工资',\n",
       " 'A040706': '城镇单位就业人员平均货币工资指数(上年=100)',\n",
       " 'A040707': '城镇单位在岗职工平均货币工资指数(上年=100)',\n",
       " 'A040708': '国有城镇单位就业人员平均货币工资指数(上年=100)',\n",
       " 'A040709': '城镇集体单位就业人员平均货币工资指数(上年=100)',\n",
       " 'A04070A': '其他城镇单位就业人员平均货币工资指数(上年=100)',\n",
       " 'A04070B': '城镇单位就业人员平均实际工资指数(上年=100)',\n",
       " 'A04070C': '城镇单位在岗职工平均实际工资指数(上年=100)',\n",
       " 'A04070D': '国有城镇单位就业人员平均实际工资指数(上年=100)',\n",
       " 'A04070E': '城镇集体单位就业人员平均实际工资指数(上年=100)',\n",
       " 'A04070F': '其他城镇单位就业人员平均实际工资指数(上年=100)',\n",
       " 'A040801': '城镇单位就业人员平均工资',\n",
       " 'A040802': '国有单位就业人员平均工资',\n",
       " 'A040803': '城镇集体单位就业人员平均工资',\n",
       " 'A040804': '股份合作单位就业人员平均工资',\n",
       " 'A040805': '联营单位就业人员平均工资',\n",
       " 'A040806': '有限责任公司就业人员平均工资',\n",
       " 'A040807': '股份有限公司就业人员平均工资',\n",
       " 'A040808': '其他单位就业人员平均工资',\n",
       " 'A040809': '港、澳、台商投资单位就业人员平均工资',\n",
       " 'A04080A': '外商投资单位就业人员平均工资',\n",
       " 'A040901': '城镇单位就业人员工资总额',\n",
       " 'A040902': '农、林、牧、渔业城镇单位就业人员工资总额',\n",
       " 'A040903': '采矿业城镇单位就业人员工资总额',\n",
       " 'A040904': '制造业城镇单位就业人员工资总额',\n",
       " 'A040905': '电力、燃气及水的生产和供应业城镇单位就业人员工资总额',\n",
       " 'A040906': '建筑业城镇单位就业人员工资总额',\n",
       " 'A040907': '交通运输、仓储和邮政业城镇单位就业人员工资总额',\n",
       " 'A040908': '信息传输、计算机服务和软件业城镇单位就业人员工资总额',\n",
       " 'A040909': '批发和零售业城镇单位就业人员工资总额',\n",
       " 'A04090A': '住宿和餐饮业城镇单位就业人员工资总额',\n",
       " 'A04090B': '金融业城镇单位就业人员工资总额',\n",
       " 'A04090C': '房地产业城镇单位就业人员工资总额',\n",
       " 'A04090D': '租赁和商务服务业城镇单位就业人员工资总额',\n",
       " 'A04090E': '科学研究、技术服务和地质勘查业城镇单位就业人员工资总额',\n",
       " 'A04090F': '水利、环境和公共设施管理业城镇单位就业人员工资总额',\n",
       " 'A04090G': '居民服务和其他服务业城镇单位就业人员工资总额',\n",
       " 'A04090H': '教育城镇单位就业人员工资总额',\n",
       " 'A04090I': '卫生、社会保障和社会福利业城镇单位就业人员工资总额',\n",
       " 'A04090J': '文化、体育和娱乐业城镇单位就业人员工资总额',\n",
       " 'A04090K': '公共管理和社会组织城镇单位就业人员工资总额',\n",
       " 'A040A01': '城镇单位就业人员平均工资',\n",
       " 'A040A02': '农、林、牧、渔业城镇单位就业人员平均工资',\n",
       " 'A040A03': '采矿业城镇单位就业人员平均工资',\n",
       " 'A040A04': '制造业城镇单位就业人员平均工资',\n",
       " 'A040A05': '电力、燃气及水的生产和供应业城镇单位就业人员平均工资',\n",
       " 'A040A06': '建筑业城镇单位就业人员平均工资',\n",
       " 'A040A07': '交通运输、仓储和邮政业城镇单位就业人员平均工资',\n",
       " 'A040A08': '信息传输、计算机服务和软件业城镇单位就业人员平均工资',\n",
       " 'A040A09': '批发和零售业城镇单位就业人员平均工资',\n",
       " 'A040A0A': '住宿和餐饮业城镇单位就业人员平均工资',\n",
       " 'A040A0B': '金融业城镇单位就业人员平均工资',\n",
       " 'A040A0C': '房地产业城镇单位就业人员平均工资',\n",
       " 'A040A0D': '租赁和商务服务业城镇单位就业人员平均工资',\n",
       " 'A040A0E': '科学研究、技术服务和地质勘查业城镇单位就业人员平均工资',\n",
       " 'A040A0F': '水利、环境和公共设施管理业城镇单位就业人员平均工资',\n",
       " 'A040A0G': '居民服务和其他服务业城镇单位就业人员平均工资',\n",
       " 'A040A0H': '教育城镇单位就业人员平均工资',\n",
       " 'A040A0I': '卫生、社会保障和社会福利业城镇单位就业人员平均工资',\n",
       " 'A040A0J': '文化、体育和娱乐业城镇单位就业人员平均工资',\n",
       " 'A040A0K': '公共管理和社会组织城镇单位就业人员平均工资',\n",
       " 'A040B01': '城镇私营单位就业人员平均工资',\n",
       " 'A040B02': '农、林、牧、渔业城镇私营单位就业人员平均工资',\n",
       " 'A040B03': '采矿业城镇私营单位就业人员平均工资',\n",
       " 'A040B04': '制造业城镇私营单位就业人员平均工资',\n",
       " 'A040B05': '电力、燃气及水的生产和供应业城镇私营单位就业人员平均工资',\n",
       " 'A040B06': '建筑业城镇私营单位就业人员平均工资',\n",
       " 'A040B07': '交通运输、仓储和邮政业城镇私营单位就业人员平均工资',\n",
       " 'A040B08': '信息传输、计算机服务和软件业城镇私营单位就业人员平均工资',\n",
       " 'A040B09': '批发和零售业城镇私营单位就业人员平均工资',\n",
       " 'A040B0A': '住宿和餐饮业城镇私营单位就业人员平均工资',\n",
       " 'A040B0B': '金融业城镇私营单位就业人员平均工资',\n",
       " 'A040B0C': '房地产业城镇私营单位就业人员平均工资',\n",
       " 'A040B0D': '租赁和商务服务业城镇私营单位就业人员平均工资',\n",
       " 'A040B0E': '科学研究、技术服务和地质勘查业城镇私营单位就业人员平均工资',\n",
       " 'A040B0F': '水利、环境和公共设施管理业城镇私营单位就业人员平均工资',\n",
       " 'A040B0G': '居民服务和其他服务业城镇私营单位就业人员平均工资',\n",
       " 'A040B0H': '教育城镇私营单位就业人员平均工资',\n",
       " 'A040B0I': '卫生、社会保障和社会福利业城镇私营单位就业人员平均工资',\n",
       " 'A040B0J': '文化、体育和娱乐业城镇私营单位就业人员平均工资',\n",
       " 'A040B0K': '公共管理和社会组织城镇私营单位就业人员平均工资',\n",
       " 'A040C01': '城镇登记失业人数',\n",
       " 'A040C02': '城镇登记失业率',\n",
       " 'A050101': '全社会固定资产投资',\n",
       " 'A050102': '城镇固定资产投资',\n",
       " 'A050103': '房地产开发投资',\n",
       " 'A050201': '全社会固定资产投资',\n",
       " 'A050202': '内资企业全社会固定资产投资',\n",
       " 'A050203': '国有全社会固定资产投资',\n",
       " 'A050204': '集体全社会固定资产投资',\n",
       " 'A050205': '股份合作全社会固定资产投资',\n",
       " 'A050206': '联营全社会固定资产投资',\n",
       " 'A050207': '有限责任公司全社会固定资产投资',\n",
       " 'A050208': '股份有限公司全社会固定资产投资',\n",
       " 'A050209': '私营全社会固定资产投资',\n",
       " 'A05020A': '个体全社会固定资产投资',\n",
       " 'A05020B': '其他全社会固定资产投资',\n",
       " 'A05020C': '港、澳、台商投资全社会固定资产投资',\n",
       " 'A05020D': '外商投资全社会固定资产投资',\n",
       " 'A050301': '全社会固定资产本年资金来源小计',\n",
       " 'A050302': '全社会固定资产投资中国家预算内资金',\n",
       " 'A050303': '全社会固定资产投资中国内贷款',\n",
       " 'A050304': '全社会固定资产投资中利用外资',\n",
       " 'A050305': '全社会固定资产投资中自筹资金',\n",
       " 'A050306': '全社会固定资产投资中其他资金',\n",
       " 'A050401': '全社会住宅投资',\n",
       " 'A050402': '城镇住宅投资',\n",
       " 'A050403': '房地产住宅投资',\n",
       " 'A050501': '全社会固定资产投资',\n",
       " 'A050502': '农、林、牧、渔业全社会固定资产投资',\n",
       " 'A050503': '采矿业全社会固定资产投资',\n",
       " 'A050504': '制造业全社会固定资产投资',\n",
       " 'A050505': '电力、燃气及水的生产和供应业全社会固定资产投资',\n",
       " 'A050506': '建筑业全社会固定资产投资',\n",
       " 'A050507': '交通运输、仓储和邮政业全社会固定资产投资',\n",
       " 'A050508': '信息传输计算机服务和软件业全社会固定资产投资',\n",
       " 'A050509': '批发和零售业全社会固定资产投资',\n",
       " 'A05050A': '住宿和餐饮业全社会固定资产投资',\n",
       " 'A05050B': '金融业全社会固定资产投资',\n",
       " 'A05050C': '房地产业全社会固定资产投资',\n",
       " 'A05050D': '租赁和商务服务业全社会固定资产投资',\n",
       " 'A05050E': '科学研究、技术服务和地质勘查业全社会固定资产投资',\n",
       " 'A05050F': '水利、环境和公共设施管理业全社会固定资产投资',\n",
       " 'A05050G': '居民服务和其他服务业全社会固定资产投资',\n",
       " 'A05050H': '教育全社会固定资产投资',\n",
       " 'A05050I': '卫生、社会保障和社会福利业全社会固定资产投资',\n",
       " 'A05050J': '文化、体育和娱乐业全社会固定资产投资',\n",
       " 'A05050K': '公共管理和社会组织全社会固定资产投资',\n",
       " 'A05050L': '国际组织全社会固定资产投资',\n",
       " 'A050601': '全社会建设总规模',\n",
       " 'A050602': '全社会在建总规模',\n",
       " 'A050603': '全社会在建净规模',\n",
       " 'A050701': '房屋施工面积',\n",
       " 'A050702': '住宅房屋施工面积',\n",
       " 'A050703': '商品住宅房屋施工面积',\n",
       " 'A050704': '房屋竣工面积',\n",
       " 'A050705': '住宅房屋竣工面积',\n",
       " 'A050706': '商品住宅房屋竣工面积',\n",
       " 'A050707': '房屋竣工价值',\n",
       " 'A050708': '住宅房屋竣工价值',\n",
       " 'A050709': '商品住宅房屋竣工价值',\n",
       " 'A050801': '固定资产投资(不含农户)国家预算内资金',\n",
       " 'A050802': '固定资产投资(不含农户)国内贷款',\n",
       " 'A050803': '固定资产投资(不含农户)利用外资',\n",
       " 'A050804': '固定资产投资(不含农户)自筹资金',\n",
       " 'A050805': '固定资产投资(不含农户)其他资金',\n",
       " 'A050901': '固定资产投资(不含农户)中央项目',\n",
       " 'A050902': '固定资产投资(不含农户)地方项目',\n",
       " 'A050A01': '固定资产投资(不含农户)',\n",
       " 'A050A02': '固定资产投资(不含农户)建筑安装工程',\n",
       " 'A050A03': '固定资产投资(不含农户)设备、工器具购置',\n",
       " 'A050A04': '固定资产投资(不含农户)其他费用',\n",
       " 'A050A05': '新建固定资产投资(不含农户)',\n",
       " 'A050A06': '扩建固定资产投资(不含农户)',\n",
       " 'A050A07': '改建固定资产投资(不含农户)',\n",
       " 'A050B01': '固定资产投资(不含农户)建设总规模',\n",
       " 'A050B02': '固定资产投资(不含农户)在建总规模',\n",
       " 'A050B03': '固定资产投资(不含农户)在建净规模',\n",
       " 'A050C01': '固定资产投资(不含农户)',\n",
       " 'A050C02': '农、林、牧、渔业固定资产投资(不含农户)',\n",
       " 'A050C03': '采矿业固定资产投资(不含农户)',\n",
       " 'A050C04': '制造业固定资产投资(不含农户)',\n",
       " 'A050C05': '电力、燃气及水的生产和供应业固定资产投资(不含农户)',\n",
       " 'A050C06': '建筑业固定资产投资(不含农户)',\n",
       " 'A050C07': '交通运输仓储和邮政业固定资产投资(不含农户)',\n",
       " 'A050C08': '信息传输、计算机服务和软件业固定资产投资(不含农户)',\n",
       " 'A050C09': '批发和零售业固定资产投资(不含农户)',\n",
       " 'A050C0A': '住宿和餐饮业固定资产投资(不含农户)',\n",
       " 'A050C0B': '金融业固定资产投资(不含农户)',\n",
       " 'A050C0C': '房地产业固定资产投资(不含农户)',\n",
       " 'A050C0D': '租赁和商务服务业固定资产投资(不含农户)',\n",
       " 'A050C0E': '科学研究、技术服务和地质勘查业固定资产投资(不含农户)',\n",
       " 'A050C0F': '水利、环境和公共设施管理业固定资产投资(不含农户)',\n",
       " 'A050C0G': '居民服务和其他服务业固定资产投资(不含农户)',\n",
       " 'A050C0H': '教育固定资产投资(不含农户)',\n",
       " 'A050C0I': '卫生、社会保障和社会福利业固定资产投资(不含农户)',\n",
       " 'A050C0J': '文化、体育和娱乐业固定资产投资(不含农户)',\n",
       " 'A050C0K': '公共管理和社会组织固定资产投资(不含农户)',\n",
       " 'A050C0L': '国际组织固定资产投资(不含农户)',\n",
       " 'A050D01': '500万元以下固定资产投资(不含农户)',\n",
       " 'A050D02': '500万元-1亿元固定资产投资(不含农户)',\n",
       " 'A050D03': '1-5亿元固定资产投资(不含农户)',\n",
       " 'A050D04': '5-10亿元固定资产投资(不含农户)',\n",
       " 'A050D05': '10亿元以上固定资产投资(不含农户)',\n",
       " 'A050E01': '能源工业固定资产投资(不含农户)',\n",
       " 'A050E02': '煤炭开采及洗选业固定资产投资(不含农户)',\n",
       " 'A050E03': '石油及天然气开采业固定资产投资(不含农户)',\n",
       " 'A050E04': '石油及炼焦加工业固定资产投资(不含农户)',\n",
       " 'A050E05': '电力、热力及燃气的生产和供应业固定资产投资(不含农户)',\n",
       " 'A050F01': '固定资产投资(不含农户)房屋施工面积',\n",
       " 'A050F02': '固定资产投资(不含农户)住宅施工面积',\n",
       " 'A050F03': '固定资产投资(不含农户)房屋竣工面积',\n",
       " 'A050F04': '固定资产投资(不含农户)住宅竣工面积',\n",
       " 'A050F05': '固定资产投资(不含农户)竣工房屋价值',\n",
       " 'A050F06': '固定资产投资(不含农户)竣工住宅价值',\n",
       " 'A050G01': '新增固定资产投资(不含农户)',\n",
       " 'A050G02': '农、林、牧、渔业新增固定资产投资(不含农户)',\n",
       " 'A050G03': '采掘业新增固定资产投资(不含农户)',\n",
       " 'A050G04': '制造业新增固定资产投资(不含农户)',\n",
       " 'A050G05': '电力、煤气及水的生产和供应业新增固定资产投资(不含农户)',\n",
       " 'A050G06': '建筑业新增固定资产投资(不含农户)',\n",
       " 'A050G07': '交通运输仓储和邮政业新增固定资产投资(不含农户)',\n",
       " 'A050G08': '信息传输、计算机服务和软件业新增固定资产投资(不含农户)',\n",
       " 'A050G09': '批发和零售业新增固定资产投资(不含农户)',\n",
       " 'A050G0A': '住宿和餐饮业新增固定资产投资(不含农户)',\n",
       " 'A050G0B': '金融业新增固定资产投资(不含农户)',\n",
       " 'A050G0C': '房地产业新增固定资产投资(不含农户)',\n",
       " 'A050G0D': '租赁和商务服务业新增固定资产投资(不含农户)',\n",
       " 'A050G0E': '科学研究、技术服务和地质勘查业新增固定资产投资(不含农户)',\n",
       " 'A050G0F': '水利、环境和公共设施管理业新增固定资产投资(不含农户)',\n",
       " 'A050G0G': '居民服务和其他服务业新增固定资产投资(不含农户)',\n",
       " 'A050G0H': '教育新增固定资产投资(不含农户)',\n",
       " 'A050G0I': '卫生、社会保障和社会福利业新增固定资产投资(不含农户)',\n",
       " 'A050G0J': '文化、体育和娱乐业新增固定资产投资(不含农户)',\n",
       " 'A050G0K': '公共管理和社会组织新增固定资产投资(不含农户)',\n",
       " 'A050G0L': '国际组织新增固定资产投资(不含农户)',\n",
       " 'A050H01': '固定资产投资(不含农户)施工项目个数',\n",
       " 'A050H02': '固定资产投资(不含农户)新开工项目个数',\n",
       " 'A050H03': '固定资产投资(不含农户)全部建成投产项目个数',\n",
       " 'A050H04': '固定资产投资(不含农户)项目建成投产率',\n",
       " 'A050I01': '固定资产投资(不含农户)',\n",
       " 'A050I02': '固定资产投资(不含农户)新增固定资产',\n",
       " 'A050I03': '固定资产投资(不含农户)交付使用率',\n",
       " 'A050J01': '农村农户固定资产投资额',\n",
       " 'A050J02': '农村农户竣工房屋投资额',\n",
       " 'A050J03': '农村农户竣工住宅投资额',\n",
       " 'A050J04': '农村农户施工房屋建筑面积',\n",
       " 'A050J05': '农村农户竣工房屋建筑面积',\n",
       " 'A050J06': '农村农户竣工住宅建筑面积',\n",
       " 'A050J07': '农村农户竣工房屋造价',\n",
       " 'A050J08': '农村农户竣工住宅造价',\n",
       " 'A051C01': '房地产开发企业个数',\n",
       " 'A051C02': '内资房地产开发企业个数',\n",
       " 'A051C03': '国有房地产开发企业个数',\n",
       " 'A051C04': '集体房地产开发企业个数',\n",
       " 'A051C05': '港、澳、台投资房地产开发企业个数',\n",
       " 'A051C06': '外商投资房地产开发企业个数',\n",
       " 'A051D01': '房地产开发企业平均从业人数',\n",
       " 'A051D02': '内资房地产开发企业平均从业人数',\n",
       " 'A051D03': '国有房地产开发企业平均从业人数',\n",
       " 'A051D04': '集体房地产开发企业平均从业人数',\n",
       " 'A051D05': '港、澳、台投资房地产开发企业平均从业人数',\n",
       " 'A051D06': '外商投资房地产开发企业平均从业人数',\n",
       " 'A051E01': '房地产开发企业待开发土地面积',\n",
       " 'A051E02': '房地产开发企业购置土地面积',\n",
       " 'A051E03': '房地产开发企业土地成交价款',\n",
       " 'A051E04': '房地产开发企业土地购置费用',\n",
       " 'A051F01': '房地产开发企业计划总投资',\n",
       " 'A051F02': '房地产开发企业自开始建设至本年底累计完成投资',\n",
       " 'A051F03': '房地产开发企业本年完成投资额',\n",
       " 'A051F04': '房地产开发企业建筑安装工程本年完成投资额',\n",
       " 'A051F05': '房地产开发企业设备工器具购置本年完成投资额',\n",
       " 'A051F06': '房地产开发企业其他费用本年完成投资额',\n",
       " 'A051G01': '房地产开发投资额',\n",
       " 'A051G02': '房地产开发住宅投资额',\n",
       " 'A051G03': '房地产开发别墅、高档公寓投资额',\n",
       " 'A051G04': '房地产开发办公楼投资额',\n",
       " 'A051G05': '房地产开发商业营业用房投资额',\n",
       " 'A051G06': '房地产开发其他投资额',\n",
       " 'A051H01': '房地产开发企业本年实际到位资金',\n",
       " 'A051H02': '房地产开发企业国内贷款',\n",
       " 'A051H03': '房地产开发企业利用外资',\n",
       " 'A051H04': '房地产开发企业外商直接投资',\n",
       " 'A051H05': '房地产开发企业自筹资金',\n",
       " 'A051H06': '房地产开发企业其他资金来源',\n",
       " 'A051H07': '房地产开发企业定金及预收款',\n",
       " 'A051H08': '房地产开发企业个人按揭贷款',\n",
       " 'A051H09': '房地产开发企业其他到位资金',\n",
       " 'A051I01': '房地产开发企业施工房屋面积',\n",
       " 'A051I02': '房地产开发企业竣工房屋面积',\n",
       " 'A051I03': '房地产开发企业房屋建筑面积竣工率',\n",
       " 'A051I04': '房地产开发企业竣工房屋价值',\n",
       " 'A051I05': '房地产开发企业竣工房屋造价',\n",
       " 'A051J01': '房地产开发企业新开工房屋面积',\n",
       " 'A051J02': '房地产开发企业住宅新开工房屋面积',\n",
       " 'A051J03': '房地产开发企业别墅、高档公寓新开工房屋面积',\n",
       " 'A051J04': '房地产开发企业办公楼新开工房屋面积',\n",
       " 'A051J05': '房地产开发企业商业营业用房新开工房屋面积',\n",
       " 'A051J06': '房地产开发企业其他用途新开工房屋面积',\n",
       " 'A051K01': '商品房销售面积',\n",
       " 'A051K02': '住宅商品房销售面积',\n",
       " 'A051K03': '别墅、高档公寓销售面积',\n",
       " 'A051K04': '办公楼商品房销售面积',\n",
       " 'A051K05': '商业营业用房销售面积',\n",
       " 'A051K06': '其他商品房销售面积',\n",
       " 'A051L01': '商品房销售额',\n",
       " 'A051L02': '住宅商品房销售额',\n",
       " 'A051L03': '别墅、高档公寓销售额',\n",
       " 'A051L04': '办公楼销售额',\n",
       " 'A051L05': '商业营业用房销售额',\n",
       " 'A051L06': '其他商品房销售额',\n",
       " 'A051M01': '商品房平均销售价格',\n",
       " 'A051M02': '住宅商品房平均销售价格',\n",
       " 'A051M03': '别墅、高档公寓平均销售价格',\n",
       " 'A051M04': '办公楼商品房平均销售价格',\n",
       " 'A051M05': '商业营业用房平均销售价格',\n",
       " 'A051M06': '其他商品房平均销售价格',\n",
       " 'A051N01': '房地产开发企业实收资本',\n",
       " 'A051N02': '房地产开发企业资产总计',\n",
       " 'A051N03': '房地产开发企业累计折旧',\n",
       " 'A051N04': '房地产开发企业本年折旧',\n",
       " 'A051N05': '房地产开发企业负债合计',\n",
       " 'A051N06': '房地产开发企业所有者权益',\n",
       " 'A051N07': '房地产开发企业资产负债率',\n",
       " 'A051O01': '房地产开发企业主营业务收入',\n",
       " 'A051O02': '房地产开发企业土地转让收入',\n",
       " 'A051O03': '房地产开发企业商品房销售收入',\n",
       " 'A051O04': '房地产开发企业房屋出租收入',\n",
       " 'A051O05': '房地产开发企业其他收入',\n",
       " 'A051O06': '房地产开发企业主营业务税金及附加',\n",
       " 'A051O07': '房地产开发企业营业利润',\n",
       " 'A051P01': '500万元以下房地产开发投资额',\n",
       " 'A051P02': '500-1000万元房地产开发投资额',\n",
       " 'A051P03': '1000-3000万元房地产开发投资额',\n",
       " 'A051P04': '3000-5000万元房地产开发投资额',\n",
       " 'A051P05': '5000万-1亿元房地产开发投资额',\n",
       " 'A051P06': '1-5亿元房地产开发投资额',\n",
       " 'A051P07': '5-10亿元房地产开发投资额',\n",
       " 'A051P08': '10亿元以上房地产开发投资额',\n",
       " 'A051Q01': '房地产开发企业住宅竣工套数',\n",
       " 'A051Q02': '房地产开发企业别墅、高档公寓竣工套数',\n",
       " 'A051Q03': '房地产开发企业住宅销售套数',\n",
       " 'A051Q04': '房地产开发企业别墅、高档公寓销售套数',\n",
       " 'A060101': '经营单位所在地进出口总额',\n",
       " 'A060102': '经营单位所在地出口总额',\n",
       " 'A060103': '经营单位所在地进口总额',\n",
       " 'A060201': '境内目的地和货源地进出口总额',\n",
       " 'A060202': '境内目的地和货源地出口总额',\n",
       " 'A060203': '境内目的地和货源地进口总额',\n",
       " 'A060301': '外商投资企业进出口总额',\n",
       " 'A060302': '外商投资企业出口总额',\n",
       " 'A060303': '外商投资企业进口总额',\n",
       " 'A060401': '外商投资企业数',\n",
       " 'A060402': '外商投资企业投资总额',\n",
       " 'A060403': '外商投资企业注册资本',\n",
       " 'A060404': '外方外商投资企业注册资本',\n",
       " 'A070101': '国有经济能源工业固定资产投资',\n",
       " 'A070102': '国有经济煤炭采选业固定资产投资',\n",
       " 'A070103': '国有经济石油和天然气开采业固定资产投资',\n",
       " 'A070104': '国有经济电力、蒸汽、热水生产和供应业固定资产投资',\n",
       " 'A070105': '国有经济石油加工及炼焦业固定资产投资',\n",
       " 'A070106': '国有经济煤气生产和供应业固定资产投资',\n",
       " 'A070201': '能源工业投资',\n",
       " 'A070202': '煤炭采选业投资',\n",
       " 'A070203': '石油和天然气开采业投资',\n",
       " 'A070204': '电力、蒸汽、热水生产和供应业投资',\n",
       " 'A070205': '石油加工及炼焦业投资',\n",
       " 'A070206': '煤气生产和供应业投资',\n",
       " 'A070301': '焦炭生产量',\n",
       " 'A070302': '原油生产量',\n",
       " 'A070303': '汽油生产量',\n",
       " 'A070304': '煤油生产量',\n",
       " 'A070305': '柴油生产量',\n",
       " 'A070306': '燃料油生产量',\n",
       " 'A070307': '天然气生产量',\n",
       " 'A070308': '发电量',\n",
       " 'A070309': '水力发电量',\n",
       " 'A07030A': '火力发电量',\n",
       " 'A070401': '城市天然气供气总量',\n",
       " 'A070402': '城市天然气用气人口',\n",
       " 'A070403': '城市人工煤气供气总量',\n",
       " 'A070404': '城市人工煤气用气人口',\n",
       " 'A070405': '城市液化石油气供气总量',\n",
       " 'A070406': '城市液化石油气用气人口',\n",
       " 'A070501': '蒸汽供热能力',\n",
       " 'A070502': '热水供热能力',\n",
       " 'A070601': '煤炭消费量',\n",
       " 'A070602': '焦炭消费量',\n",
       " 'A070603': '原油消费量',\n",
       " 'A070604': '汽油消费量',\n",
       " 'A070605': '煤油消费量',\n",
       " 'A070606': '柴油消费量',\n",
       " 'A070607': '燃料油消费量',\n",
       " 'A070608': '天然气消费量',\n",
       " 'A070609': '电力消费量',\n",
       " 'A070701': '单位地区生产总值能耗(等价值)',\n",
       " 'A070702': '单位地区生产总值能耗(等价值)_同比增长',\n",
       " 'A070703': '单位工业增加值能耗(规模以上当量值)',\n",
       " 'A070704': '单位工业增加值能耗(规模以上当量值)_同比增长',\n",
       " 'A070705': '单位地区生产总值电耗(等价值)',\n",
       " 'A070706': '单位地区生产总值电耗(等价值)_同比增长',\n",
       " 'A080101': '地方财政一般预算收入',\n",
       " 'A080102': '地方财政税收收入',\n",
       " 'A080103': '地方财政国内增值税',\n",
       " 'A080104': '地方财政营业税',\n",
       " 'A080105': '地方财政企业所得税',\n",
       " 'A080106': '地方财政个人所得税',\n",
       " 'A080107': '地方财政资源税',\n",
       " 'A080108': '地方财政固定资产投资方向调节税',\n",
       " 'A080109': '地方财政城市维护建设税',\n",
       " 'A08010A': '地方财政房产税',\n",
       " 'A08010B': '地方财政印花税',\n",
       " 'A08010C': '地方财政城镇土地使用税',\n",
       " 'A08010D': '地方财政土地增值税',\n",
       " 'A08010E': '地方财政车船税',\n",
       " 'A08010F': '地方财政耕地占用税',\n",
       " 'A08010G': '地方财政契税',\n",
       " 'A08010H': '地方财政烟叶税',\n",
       " 'A08010I': '地方财政其他税收收入',\n",
       " 'A08010J': '地方财政非税收入',\n",
       " 'A08010K': '地方财政专项收入',\n",
       " 'A08010L': '地方财政行政事业性收费收入',\n",
       " 'A08010M': '地方财政罚没收入',\n",
       " 'A08010N': '地方财政国有资本经营收入',\n",
       " 'A08010O': '地方财政国有资源(资产)有偿使用收入',\n",
       " 'A08010P': '地方财政其他非税收入',\n",
       " 'A080201': '地方财政一般预算支出',\n",
       " 'A080202': '地方财政一般公共服务支出',\n",
       " 'A080203': '地方财政外交支出',\n",
       " 'A080204': '地方财政国防支出',\n",
       " 'A080205': '地方财政公共安全支出',\n",
       " 'A080206': '地方财政教育支出',\n",
       " 'A080207': '地方财政科学技术支出',\n",
       " 'A080208': '地方财政文化体育与传媒支出',\n",
       " 'A080209': '地方财政社会保障和就业支出',\n",
       " 'A08020A': '地方财政医疗卫生支出',\n",
       " 'A08020B': '地方财政环境保护支出',\n",
       " 'A08020C': '地方财政城乡社区事务支出',\n",
       " 'A08020D': '地方财政农林水事务支出',\n",
       " 'A08020E': '地方财政交通运输支出',\n",
       " 'A08020F': '地方财政资源勘探电力信息等事务支出',\n",
       " 'A08020G': '地方财政商业服务业等事务支出',\n",
       " 'A08020H': '地方财政金融监管支出',\n",
       " 'A08020I': '地方财政地震灾后重建支出',\n",
       " 'A08020J': '地方财政国土资源气象等事务支出决策数',\n",
       " 'A08020K': '地方财政住房保障支出支出',\n",
       " 'A08020L': '地方财政粮油物资储备管理等事务',\n",
       " 'A08020M': '地方财政国债还本付息支出',\n",
       " 'A08020N': '地方财政其他支出',\n",
       " 'A090101': '居民消费价格指数(上年=100)',\n",
       " 'A090102': '城市居民消费价格指数(上年=100)',\n",
       " 'A090103': '农村居民消费价格指数(上年=100)',\n",
       " 'A090104': '商品零售价格指数(上年=100)',\n",
       " 'A090105': '城市商品零售价格指数(上年=100)',\n",
       " 'A090106': '农村商品零售价格指数(上年=100)',\n",
       " 'A090201': '居民消费价格指数(上年=100)',\n",
       " 'A090202': '食品类居民消费价格指数(上年=100)',\n",
       " 'A090203': '粮食类居民消费价格指数(上年=100)',\n",
       " 'A090204': '油脂类居民消费价格指数(上年=100)',\n",
       " 'A090205': '肉禽及其制品类居民消费价格指数(上年=100)',\n",
       " 'A090206': '蛋类居民消费价格指数(上年=100)',\n",
       " 'A090207': '水产品类居民消费价格指数(上年=100)',\n",
       " 'A090208': '菜类居民消费价格指数(上年=100)',\n",
       " 'A090209': '鲜菜类居民消费价格指数(上年=100)',\n",
       " 'A09020A': '干鲜瓜果类居民消费价格指数(上年=100)',\n",
       " 'A09020B': '鲜果类居民消费价格指数(上年=100)',\n",
       " 'A09020C': '在外用膳食品类居民消费价格指数(上年=100)',\n",
       " 'A09020D': '烟酒及用品类居民消费价格指数(上年=100)',\n",
       " 'A09020E': '烟草类居民消费价格指数(上年=100)',\n",
       " 'A09020F': '酒类居民消费价格指数(上年=100)',\n",
       " 'A09020G': '衣着类居民消费价格指数(上年=100)',\n",
       " 'A09020H': '服装类居民消费价格指数(上年=100)',\n",
       " 'A09020I': '衣着材料类居民消费价格指数(上年=100)',\n",
       " 'A09020J': '鞋袜帽类居民消费价格指数(上年=100)',\n",
       " 'A09020K': '衣着加工服务费类居民消费价格指数(上年=100)',\n",
       " 'A09020L': '家庭设备用品及服务类居民消费价格指数(上年=100)',\n",
       " 'A09020M': '耐用消费品类居民消费价格指数(上年=100)',\n",
       " 'A09020N': '室内装饰品类居民消费价格指数(上年=100)',\n",
       " 'A09020O': '床上用品类居民消费价格指数(上年=100)',\n",
       " 'A09020P': '家庭日用杂品类居民消费价格指数(上年=100)',\n",
       " 'A09020Q': '家庭服务及加工维修服务费类居民消费价格指数(上年=100)',\n",
       " 'A09020R': '医疗保健和个人用品类居民消费价格指数(上年=100)',\n",
       " 'A09020S': '医疗保健类居民消费价格指数(上年=100)',\n",
       " 'A09020T': '医疗器具及用品类居民消费价格指数(上年=100)',\n",
       " 'A09020U': '中药材及中成药类居民消费价格指数(上年=100)',\n",
       " 'A09020V': '西药类居民消费价格指数(上年=100)',\n",
       " 'A09020W': '保健器具及用品类居民消费价格指数(上年=100)',\n",
       " 'A09020X': '医疗保健服务类居民消费价格指数(上年=100)',\n",
       " 'A09020Y': '个人用品及服务类居民消费价格指数(上年=100)',\n",
       " 'A09020Z': '化妆美容用品类居民消费价格指数(上年=100)',\n",
       " 'A090210': '卫生用品类居民消费价格指数(上年=100)',\n",
       " 'A090211': '个人饰品类居民消费价格指数(上年=100)',\n",
       " 'A090212': '个人服务类居民消费价格指数(上年=100)',\n",
       " 'A090213': '交通和通信类居民消费价格指数(上年=100)',\n",
       " 'A090214': '交通类居民消费价格指数(上年=100)',\n",
       " 'A090215': '交通工具类居民消费价格指数(上年=100)',\n",
       " 'A090216': '车用燃料及零配件类居民消费价格指数(上年=100)',\n",
       " 'A090217': '车辆使用及维修费类居民消费价格指数(上年=100)',\n",
       " 'A090218': '市内公共交通费类居民消费价格指数(上年=100)',\n",
       " 'A090219': '城市间交通费类居民消费价格指数(上年=100)',\n",
       " 'A09021A': '通信类居民消费价格指数(上年=100)',\n",
       " 'A09021B': '通信工具类居民消费价格指数(上年=100)',\n",
       " 'A09021C': '通信服务类居民消费价格指数(上年=100)',\n",
       " 'A09021D': '娱乐教育文化类居民消费价格指数(上年=100)',\n",
       " 'A09021E': '文娱用耐用消费品及服务类居民消费价格指数(上年=100)',\n",
       " 'A09021F': '教育类居民消费价格指数(上年=100)',\n",
       " 'A09021G': '教材及参考书类居民消费价格指数(上年=100)',\n",
       " 'A09021H': '学杂托幼费类居民消费价格指数(上年=100)',\n",
       " 'A09021I': '文化娱乐类居民消费价格指数(上年=100)',\n",
       " 'A09021J': '文化娱乐用品类居民消费价格指数(上年=100)',\n",
       " 'A09021K': '书报杂志类居民消费价格指数(上年=100)',\n",
       " 'A09021L': '文娱费类居民消费价格指数(上年=100)',\n",
       " 'A09021M': '旅游类居民消费价格指数(上年=100)',\n",
       " 'A09021N': '居住类居民消费价格指数(上年=100)',\n",
       " 'A09021O': '建房及装修材料类居民消费价格指数(上年=100)',\n",
       " 'A09021P': '租房类居民消费价格指数(上年=100)',\n",
       " 'A09021Q': '自有住房类居民消费价格指数(上年=100)',\n",
       " 'A09021R': '水电燃料类居民消费价格指数(上年=100)',\n",
       " 'A090301': '农村居民消费价格指数(上年=100)',\n",
       " 'A090302': '食品类农村居民消费价格指数(上年=100)',\n",
       " 'A090303': '粮食类农村居民消费价格指数(上年=100)',\n",
       " 'A090304': '淀粉及制品类农村居民消费价格指数(上年=100)',\n",
       " 'A090305': '干豆类及豆制品类农村居民消费价格指数(上年=100)',\n",
       " 'A090306': '油脂类农村居民消费价格指数(上年=100)',\n",
       " 'A090307': '肉禽及其制品类农村居民消费价格指数(上年=100)',\n",
       " 'A090308': '食用畜肉及副产品类农村居民消费价格指数(上年=100)',\n",
       " 'A090309': '禽类农村居民消费价格指数(上年=100)',\n",
       " 'A09030A': '加工肉禽类农村居民消费价格指数(上年=100)',\n",
       " 'A09030B': '蛋类农村居民消费价格指数(上年=100)',\n",
       " 'A09030C': '水产品类农村居民消费价格指数(上年=100)',\n",
       " 'A09030D': '鱼类农村居民消费价格指数(上年=100)',\n",
       " 'A09030E': '其他水产品类农村居民消费价格指数(上年=100)',\n",
       " 'A09030F': '菜类农村居民消费价格指数(上年=100)',\n",
       " 'A09030G': '调味品类农村居民消费价格指数(上年=100)',\n",
       " 'A09030H': '糖类农村居民消费价格指数(上年=100)',\n",
       " 'A09030I': '茶及饮料类农村居民消费价格指数(上年=100)',\n",
       " 'A09030J': '茶叶类农村居民消费价格指数(上年=100)',\n",
       " 'A09030K': '饮料类农村居民消费价格指数(上年=100)',\n",
       " 'A09030L': '干鲜瓜果类农村居民消费价格指数(上年=100)',\n",
       " 'A09030M': '糕点饼干类农村居民消费价格指数(上年=100)',\n",
       " 'A09030N': '液体乳及乳制品类农村居民消费价格指数(上年=100)',\n",
       " 'A09030O': '在外用膳食品类农村居民消费价格指数(上年=100)',\n",
       " 'A09030P': '其他食品类农村居民消费价格指数(上年=100)',\n",
       " 'A09030Q': '烟酒及饮料类农村居民消费价格指数(上年=100)',\n",
       " 'A09030R': '烟草类农村居民消费价格指数(上年=100)',\n",
       " 'A09030S': '酒类农村居民消费价格指数(上年=100)',\n",
       " 'A09030U': '衣着类农村居民消费价格指数(上年=100)',\n",
       " 'A09030V': '服装类农村居民消费价格指数(上年=100)',\n",
       " 'A09030W': '男式服装类农村居民消费价格指数(上年=100)',\n",
       " 'A09030X': '女式服装类农村居民消费价格指数(上年=100)',\n",
       " 'A09030Y': '儿童服装类农村居民消费价格指数(上年=100)',\n",
       " 'A09030Z': '衣着材料类农村居民消费价格指数(上年=100)',\n",
       " 'A090310': '鞋袜帽类农村居民消费价格指数(上年=100)',\n",
       " 'A090311': '鞋类农村居民消费价格指数(上年=100)',\n",
       " 'A090312': '袜子类农村居民消费价格指数(上年=100)',\n",
       " 'A090313': '帽子类农村居民消费价格指数(上年=100)',\n",
       " 'A090314': '衣着加工服务费类农村居民消费价格指数(上年=100)',\n",
       " 'A090315': '家庭设备用品及维修服务类农村居民消费价格指数(上年=100)',\n",
       " 'A090316': '耐用消费品类农村居民消费价格指数(上年=100)',\n",
       " 'A090317': '家具类农村居民消费价格指数(上年=100)',\n",
       " 'A090318': '家庭设备类农村居民消费价格指数(上年=100)',\n",
       " 'A090319': '室内装饰品类农村居民消费价格指数(上年=100)',\n",
       " 'A09031A': '床上用品类农村居民消费价格指数(上年=100)',\n",
       " 'A09031B': '家庭日用杂品类农村居民消费价格指数(上年=100)',\n",
       " 'A09031C': '家庭服务及加工维修服务类农村居民消费价格指数(上年=100)',\n",
       " 'A09031D': '医疗保健和个人用品类农村居民消费价格指数(上年=100)',\n",
       " 'A09031E': '医疗保健类农村居民消费价格指数(上年=100)',\n",
       " 'A09031F': '医疗器具及用品类农村居民消费价格指数(上年=100)',\n",
       " 'A09031G': '中药材及中成药类农村居民消费价格指数(上年=100)',\n",
       " 'A09031H': '西药类农村居民消费价格指数(上年=100)',\n",
       " 'A09031I': '保健器具及用品类农村居民消费价格指数(上年=100)',\n",
       " 'A09031J': '医疗保健服务费类农村居民消费价格指数(上年=100)',\n",
       " 'A09031K': '个人用品及服务类农村居民消费价格指数(上年=100)',\n",
       " 'A09031L': '化妆美容用品类农村居民消费价格指数(上年=100)',\n",
       " 'A09031M': '清洁化妆用品类农村居民消费价格指数(上年=100)',\n",
       " 'A09031N': '个人饰品类农村居民消费价格指数(上年=100)',\n",
       " 'A09031O': '个人服务类农村居民消费价格指数(上年=100)',\n",
       " 'A09031P': '交通和通信类农村居民消费价格指数(上年=100)',\n",
       " 'A09031Q': '交通类农村居民消费价格指数(上年=100)',\n",
       " 'A09031R': '交通工具类农村居民消费价格指数(上年=100)',\n",
       " 'A09031S': '车用燃料及零配件类农村居民消费价格指数(上年=100)',\n",
       " 'A09031T': '车辆使用及维修费类农村居民消费价格指数(上年=100)',\n",
       " 'A09031U': '市内公共交通费类农村居民消费价格指数(上年=100)',\n",
       " 'A09031V': '城市间交通费类农村居民消费价格指数(上年=100)',\n",
       " 'A09031W': '通信类农村居民消费价格指数(上年=100)',\n",
       " 'A09031X': '通信工具类农村居民消费价格指数(上年=100)',\n",
       " 'A09031Y': '通信服务类农村居民消费价格指数(上年=100)',\n",
       " 'A09031Z': '娱乐教育文化用品及服务类农村居民消费价格指数(上年=100)',\n",
       " 'A090320': '文娱用耐用消费品及服务类农村居民消费价格指数(上年=100)',\n",
       " 'A090321': '教育类农村居民消费价格指数(上年=100)',\n",
       " 'A090322': '教材及参考书类农村居民消费价格指数(上年=100)',\n",
       " 'A090323': '学杂托幼费类农村居民消费价格指数(上年=100)',\n",
       " 'A090324': '文化娱乐类农村居民消费价格指数(上年=100)',\n",
       " 'A090325': '文化娱乐用品类农村居民消费价格指数(上年=100)',\n",
       " 'A090326': '书报杂志类农村居民消费价格指数(上年=100)',\n",
       " 'A090327': '文娱费类农村居民消费价格指数(上年=100)',\n",
       " 'A090328': '旅游类农村居民消费价格指数(上年=100)',\n",
       " 'A090329': '居住类农村居民消费价格指数(上年=100)',\n",
       " 'A09032A': '建房及装修材料类农村居民消费价格指数(上年=100)',\n",
       " 'A09032B': '租房类农村居民消费价格指数(上年=100)',\n",
       " 'A09032C': '自有住房类农村居民消费价格指数(上年=100)',\n",
       " 'A09032D': '水电燃料类农村居民消费价格指数(上年=100)',\n",
       " 'A090401': '商品零售价格指数(上年=100)',\n",
       " 'A090402': '食品类商品零售价格指数(上年=100)',\n",
       " 'A090403': '粮食类商品零售价格指数(上年=100)',\n",
       " 'A090404': '油脂类商品零售价格指数(上年=100)',\n",
       " 'A090405': '肉禽及其制品类商品零售价格指数(上年=100)',\n",
       " 'A090406': '蛋类商品零售价格指数(上年=100)',\n",
       " 'A090407': '水产品类商品零售价格指数(上年=100)',\n",
       " 'A090408': '菜类商品零售价格指数(上年=100)',\n",
       " 'A090409': '干鲜瓜果类商品零售价格指数(上年=100)',\n",
       " 'A09040A': '饮料烟酒类商品零售价格指数(上年=100)',\n",
       " 'A09040B': '服装鞋帽类商品零售价格指数(上年=100)',\n",
       " 'A09040C': '纺织品类商品零售价格指数(上年=100)',\n",
       " 'A09040D': '家用电器及音像器材类商品零售价格指数(上年=100)',\n",
       " 'A09040E': '文化办公用品类商品零售价格指数(上年=100)',\n",
       " 'A09040F': '日用品类商品零售价格指数(上年=100)',\n",
       " 'A09040G': '体育娱乐用品类商品零售价格指数(上年=100)',\n",
       " 'A09040H': '交通、通信用品类商品零售价格指数(上年=100)',\n",
       " 'A09040I': '家具类商品零售价格指数(上年=100)',\n",
       " 'A09040J': '化妆品类商品零售价格指数(上年=100)',\n",
       " 'A09040K': '金银珠宝类商品零售价格指数(上年=100)',\n",
       " 'A09040L': '中西药品及医疗保健用品类商品零售价格指数(上年=100)',\n",
       " 'A09040M': '书报杂志及电子出版物类商品零售价格指数(上年=100)',\n",
       " 'A09040N': '燃料类商品零售价格指数(上年=100)',\n",
       " 'A09040O': '建筑材料及五金电料类商品零售价格指数(上年=100)',\n",
       " 'A090501': '农村商品零售价格指数(上年=100)',\n",
       " 'A090502': '食品类农村商品零售价格指数(上年=100)',\n",
       " 'A090503': '粮食类农村商品零售价格指数(上年=100)',\n",
       " 'A090504': '淀粉类农村商品零售价格指数(上年=100)',\n",
       " 'A090505': '干豆类及豆制品类农村商品零售价格指数(上年=100)',\n",
       " 'A090506': '油脂类农村商品零售价格指数(上年=100)',\n",
       " 'A090507': '肉禽及其制品类农村商品零售价格指数(上年=100)',\n",
       " 'A090508': '蛋类农村商品零售价格指数(上年=100)',\n",
       " 'A090509': '水产品类农村商品零售价格指数(上年=100)',\n",
       " 'A09050A': '菜类农村商品零售价格指数(上年=100)',\n",
       " 'A09050B': '调味品类农村商品零售价格指数(上年=100)',\n",
       " 'A09050C': '糖类农村商品零售价格指数(上年=100)',\n",
       " 'A09050D': '干鲜瓜果类农村商品零售价格指数(上年=100)',\n",
       " 'A09050E': '糕点饼干面包类农村商品零售价格指数(上年=100)',\n",
       " 'A09050F': '液体乳及乳制品类农村商品零售价格指数(上年=100)',\n",
       " 'A09050G': '在外用膳食品类农村商品零售价格指数(上年=100)',\n",
       " 'A09050H': '其他食品类农村商品零售价格指数(上年=100)',\n",
       " 'A09050I': '饮料、烟酒类农村商品零售价格指数(上年=100)',\n",
       " 'A09050J': '茶及饮料类农村商品零售价格指数(上年=100)',\n",
       " 'A09050K': '烟草类农村商品零售价格指数(上年=100)',\n",
       " 'A09050L': '酒类农村商品零售价格指数(上年=100)',\n",
       " 'A09050M': '服装、鞋帽类农村商品零售价格指数(上年=100)',\n",
       " 'A09050N': '服装类农村商品零售价格指数(上年=100)',\n",
       " 'A09050O': '鞋袜帽类农村商品零售价格指数(上年=100)',\n",
       " 'A09050P': '其他类农村商品零售价格指数(上年=100)',\n",
       " 'A09050Q': '纺织品类农村商品零售价格指数(上年=100)',\n",
       " 'A09050R': '衣着材料类农村商品零售价格指数(上年=100)',\n",
       " 'A09050S': '床上用品类农村商品零售价格指数(上年=100)',\n",
       " 'A09050T': '家用电器及音像器材类农村商品零售价格指数(上年=100)',\n",
       " 'A09050U': '家庭设备类农村商品零售价格指数(上年=100)',\n",
       " 'A09050V': '文娱用耐用消费品类农村商品零售价格指数(上年=100)',\n",
       " 'A09050W': '音像器材类农村商品零售价格指数(上年=100)',\n",
       " 'A09050X': '文化办公用品类农村商品零售价格指数(上年=100)',\n",
       " 'A09050Y': '日用品类农村商品零售价格指数(上年=100)',\n",
       " 'A09050Z': '日用百货类农村商品零售价格指数(上年=100)',\n",
       " 'A090510': '日用杂品类农村商品零售价格指数(上年=100)',\n",
       " 'A090511': '洗涤用品类农村商品零售价格指数(上年=100)',\n",
       " 'A090512': '其他日用品类农村商品零售价格指数(上年=100)',\n",
       " 'A090513': '体育娱乐用品类农村商品零售价格指数(上年=100)',\n",
       " 'A090514': '体育用品类农村商品零售价格指数(上年=100)',\n",
       " 'A090515': '娱乐用品类农村商品零售价格指数(上年=100)',\n",
       " 'A090516': '交通、通信用品类农村商品零售价格指数(上年=100)',\n",
       " 'A090517': '交通运输机械类农村商品零售价格指数(上年=100)',\n",
       " 'A090518': '通讯器材类农村商品零售价格指数(上年=100)',\n",
       " 'A090519': '家具类农村商品零售价格指数(上年=100)',\n",
       " 'A09051A': '化妆品类农村商品零售价格指数(上年=100)',\n",
       " 'A09051B': '金银珠宝类农村商品零售价格指数(上年=100)',\n",
       " 'A09051C': '中西药品及医疗保健用品类农村商品零售价格指数(上年=100)',\n",
       " 'A09051D': '医疗器具及用品类农村商品零售价格指数(上年=100)',\n",
       " 'A09051E': '中药材及中成药类农村商品零售价格指数(上年=100)',\n",
       " 'A09051F': '西药类农村商品零售价格指数(上年=100)',\n",
       " 'A09051G': '保健器具及用品类农村商品零售价格指数(上年=100)',\n",
       " 'A09051H': '书报杂志及电子出版物类农村商品零售价格指数(上年=100)',\n",
       " 'A09051I': '教材及参考书类农村商品零售价格指数(上年=100)',\n",
       " 'A09051J': '书报杂志类农村商品零售价格指数(上年=100)',\n",
       " 'A09051K': '电子音像制品类农村商品零售价格指数(上年=100)',\n",
       " 'A09051L': '燃料类农村商品零售价格指数(上年=100)',\n",
       " 'A09051M': '煤炭及制品类农村商品零售价格指数(上年=100)',\n",
       " 'A09051N': '石油及制品类农村商品零售价格指数(上年=100)',\n",
       " 'A09051O': '建筑材料及五金电料类农村商品零售价格指数(上年=100)',\n",
       " 'A09051P': '建筑装璜材料类农村商品零售价格指数(上年=100)',\n",
       " 'A09051Q': '五金电料类农村商品零售价格指数(上年=100)',\n",
       " 'A090601': '农业生产资料指数(上年=100)',\n",
       " 'A090602': '农用手工工具指数(上年=100)',\n",
       " 'A090603': '饲料价格指数(上年=100)',\n",
       " 'A090604': '产品畜价格指数(上年=100)',\n",
       " 'A090605': '半机械化农具生产资料价格指数(上年=100)',\n",
       " 'A090606': '机械化农具生产资料价格指数(上年=100)',\n",
       " 'A090607': '化学肥料生产资料价格指数(上年=100)',\n",
       " 'A090608': '农药及农药械生产资料价格指数(上年=100)',\n",
       " 'A090609': '化学农药生产资料价格指数(上年=100)',\n",
       " 'A09060A': '农药器械生产资料价格指数(上年=100)',\n",
       " 'A09060B': '农用机油生产资料价格指数(上年=100)',\n",
       " 'A09060C': '其他农业生产资料价格指数(上年=100)',\n",
       " 'A09060D': '农用种子生产资料价格指数(上年=100)',\n",
       " 'A09060E': '其他农业生产资料(除种子)价格指数(上年=100)',\n",
       " 'A09060F': '农业生产服务价格指数(上年=100)',\n",
       " 'A090701': '农产品生产价格指数(上年=100)',\n",
       " 'A090702': '种植业生产价格指数(上年价格=100)',\n",
       " 'A090703': '谷物生产价格指数(上年价格=100)',\n",
       " 'A090704': '小麦生产价格指数(上年价格=100)',\n",
       " 'A090705': '稻谷生产价格指数(上年价格=100)',\n",
       " 'A090706': '玉米生产价格指数(上年价格=100)',\n",
       " 'A090707': '豆类生产价格指数(上年价格=100)',\n",
       " 'A090708': '大豆生产价格指数(上年价格=100)',\n",
       " 'A090709': '薯类生产价格指数(上年价格=100)',\n",
       " 'A09070A': '油料生产价格指数(上年价格=100)',\n",
       " 'A09070B': '花生生产价格指数(上年价格=100)',\n",
       " 'A09070C': '油菜籽生产价格指数(上年价格=100)',\n",
       " 'A09070D': '棉花生产价格指数(上年价格=100)',\n",
       " 'A09070E': '糖料生产价格指数(上年价格=100)',\n",
       " 'A09070F': '麻类生产价格指数(上年价格=100)',\n",
       " 'A09070G': '烟叶生产价格指数(上年价格=100)',\n",
       " 'A09070H': '蔬菜生产价格指数(上年价格=100)',\n",
       " 'A09070I': '水果生产价格指数(上年价格=100)',\n",
       " 'A09070J': '茶叶生产价格指数(上年价格=100)',\n",
       " 'A09070K': '林产品生产价格指数(上年价格=100)',\n",
       " 'A09070L': '畜产品生产价格指数(上年价格=100)',\n",
       " 'A09070M': '猪生产价格指数(上年价格=100)',\n",
       " 'A09070N': '家禽生产价格指数(上年价格=100)',\n",
       " 'A09070O': '蛋类生产价格指数(上年价格=100)',\n",
       " 'A09070P': '奶类生产价格指数(上年价格=100)',\n",
       " 'A09070Q': '渔业产品生产价格指数(上年价格=100)',\n",
       " 'A09070R': '海水养殖产品生产价格指数(上年=100)',\n",
       " 'A09070S': '海水捕捞产品生产价格指数(上年=100)',\n",
       " 'A09070T': '淡水养殖产品生产价格指数(上年=100)',\n",
       " 'A09070U': '淡水捕捞产品生产价格指数(上年=100)',\n",
       " 'A090801': '工业生产者出厂价格指数(上年=100)',\n",
       " 'A090901': '固定资产投资价格指数(上年=100)',\n",
       " 'A090902': '建筑安装工程固定资产投资价格指数(上年=100)',\n",
       " 'A090903': '设备工器具购置固定资产投资价格指数(上年=100)',\n",
       " 'A090904': '其他费用固定资产投资价格指数(上年=100)',\n",
       " 'A090A01': '食品烟酒类居民消费价格指数(上年=100)',\n",
       " 'A090A02': '食品类居民消费价格指数(上年=100)',\n",
       " 'A090A03': '粮食类居民消费价格指数(上年=100)',\n",
       " 'A090A04': '薯类类居民消费价格指数(上年=100)',\n",
       " 'A090A05': '豆类类居民消费价格指数(上年=100)',\n",
       " 'A090A06': '食用油类居民消费价格指数(上年=100)',\n",
       " 'A090A07': '菜类居民消费价格指数(上年=100)',\n",
       " 'A090A08': '鲜菜类居民消费价格指数(上年=100)',\n",
       " 'A090A09': '畜肉类类居民消费价格指数(上年=100)',\n",
       " 'A090A0A': '禽肉类类居民消费价格指数(上年=100)',\n",
       " 'A090A0B': '水产品类居民消费价格指数(上年=100)',\n",
       " 'A090A0C': '蛋类类居民消费价格指数(上年=100)',\n",
       " 'A090A0D': '奶类类居民消费价格指数(上年=100)',\n",
       " 'A090A0E': '干鲜瓜果类类居民消费价格指数(上年=100)',\n",
       " 'A090A0F': '鲜瓜果类居民消费价格指数(上年=100)',\n",
       " 'A090A0G': '糖果糕点类类居民消费价格指数(上年=100)',\n",
       " 'A090A0H': '调味品类居民消费价格指数(上年=100)',\n",
       " 'A090A0I': '其他食品类类居民消费价格指数(上年=100)',\n",
       " 'A090A0J': '茶及饮料类居民消费价格指数(上年=100)',\n",
       " 'A090A0K': '烟酒类居民消费价格指数(上年=100)',\n",
       " 'A090A0L': '在外餐饮类居民消费价格指数(上年=100)',\n",
       " 'A090A0M': '衣着类居民消费价格指数(上年=100)',\n",
       " 'A090A0N': '服装类居民消费价格指数(上年=100)',\n",
       " 'A090A0O': '服装材料类居民消费价格指数(上年=100)',\n",
       " 'A090A0P': '其他衣着及配件类居民消费价格指数(上年=100)',\n",
       " 'A090A0Q': '衣着加工服务费类居民消费价格指数(上年=100)',\n",
       " 'A090A0R': '鞋类类居民消费价格指数(上年=100)',\n",
       " 'A090A0S': '居住类居民消费价格指数(上年=100)',\n",
       " 'A090A0T': '租赁房房租类居民消费价格指数(上年=100)',\n",
       " 'A090A0U': '住房保养维修及管理类居民消费价格指数(上年=100)',\n",
       " 'A090A0V': '水电燃料类居民消费价格指数(上年=100)',\n",
       " 'A090A0W': '自有住房类居民消费价格指数(上年=100)',\n",
       " 'A090A0X': '生活用品及服务类居民消费价格指数(上年=100)',\n",
       " 'A090A0Y': '家具及室内装饰品类居民消费价格指数(上年=100)',\n",
       " 'A090A0Z': '家用器具类居民消费价格指数(上年=100)',\n",
       " 'A090A10': '家用纺织品类居民消费价格指数(上年=100)',\n",
       " 'A090A11': '家庭日用杂品类居民消费价格指数(上年=100)',\n",
       " 'A090A12': '个人护理用品类居民消费价格指数(上年=100)',\n",
       " 'A090A13': '家庭服务类居民消费价格指数(上年=100)',\n",
       " 'A090A14': '交通和通信类居民消费价格指数(上年=100)',\n",
       " 'A090A15': '交通类居民消费价格指数(上年=100)',\n",
       " 'A090A16': '交通工具类居民消费价格指数(上年=100)',\n",
       " 'A090A17': '交通工具用燃料类居民消费价格指数(上年=100)',\n",
       " 'A090A18': '交通工具使用和维修类居民消费价格指数(上年=100)',\n",
       " 'A090A19': '交通费类居民消费价格指数(上年=100)',\n",
       " 'A090A1A': '通信类居民消费价格指数(上年=100)',\n",
       " 'A090A1B': '教育文化和娱乐类居民消费价格指数(上年=100)',\n",
       " 'A090A1C': '教育类居民消费价格指数(上年=100)',\n",
       " 'A090A1D': '教育用品类居民消费价格指数(上年=100)',\n",
       " 'A090A1E': '教育服务类居民消费价格指数(上年=100)',\n",
       " 'A090A1F': '文化娱乐类居民消费价格指数(上年=100)',\n",
       " 'A090A1G': '文娱耐用消费品类居民消费价格指数(上年=100)',\n",
       " 'A090A1H': '其他文娱用品类居民消费价格指数(上年=100)',\n",
       " 'A090A1I': '文化娱乐服务类居民消费价格指数(上年=100)',\n",
       " 'A090A1J': '旅游类居民消费价格指数(上年=100)',\n",
       " 'A090A1K': '医疗保健类居民消费价格指数(上年=100)',\n",
       " 'A090A1L': '药品及医疗器具类居民消费价格指数(上年=100)',\n",
       " 'A090A1M': '医疗服务类居民消费价格指数(上年=100)',\n",
       " 'A090A1N': '其他用品和服务类居民消费价格指数(上年=100)',\n",
       " 'A090A1O': '其他用品类类居民消费价格指数(上年=100)',\n",
       " 'A090A1P': '其他服务类类居民消费价格指数(上年=100)',\n",
       " 'A0A0001': '居民人均可支配收入',\n",
       " 'A0A0002': '居民人均可支配收入_同比增长',\n",
       " 'A0A0003': '城镇居民人均可支配收入',\n",
       " 'A0A0004': '城镇居民人均可支配收入_同比增长',\n",
       " 'A0A0005': '农村居民人均可支配收入',\n",
       " 'A0A0006': '农村居民人均可支配收入_同比增长',\n",
       " 'A0A0007': '居民人均消费支出',\n",
       " 'A0A0008': '居民人均消费支出_同比增长',\n",
       " 'A0A0009': '城镇居民人均消费支出',\n",
       " 'A0A0010': '城镇居民人均消费支出_同比增长',\n",
       " 'A0A0011': '农村居民人均消费支出',\n",
       " 'A0A0012': '农村居民人均消费支出_同比增长',\n",
       " 'A0A0101': '城乡居民人民币储蓄存款年底余额',\n",
       " 'A0A0201': '城镇居民人均可支配收入',\n",
       " 'A0A0202': '城镇居民人均总收入',\n",
       " 'A0A0203': '城镇居民人均工资性收入',\n",
       " 'A0A0204': '城镇居民人均经营净收入',\n",
       " 'A0A0205': '城镇居民人均财产性收入',\n",
       " 'A0A0206': '城镇居民人均转移性收入',\n",
       " 'A0A0301': '城镇居民家庭人均现金消费支出',\n",
       " 'A0A0302': '城镇居民家庭人均食品消费支出',\n",
       " 'A0A030L': '城镇居民家庭人均衣着消费支出',\n",
       " 'A0A030Q': '城镇居民家庭人均居住消费支出',\n",
       " 'A0A030T': '城镇居民家庭人均家庭设备及用品消费支出',\n",
       " 'A0A0310': '城镇居民家庭人均医疗保健消费支出',\n",
       " 'A0A0311': '城镇居民家庭人均交通和通信消费支出',\n",
       " 'A0A0314': '城镇居民家庭人均文教娱乐服务消费支出',\n",
       " 'A0A0318': '城镇居民家庭人均其它消费支出',\n",
       " 'A0A0401': '城镇居民家庭平均每百户摩托车拥有量',\n",
       " 'A0A0402': '城镇居民家庭平均每百户助力车拥有量',\n",
       " 'A0A0403': '城镇居民家庭平均每百户家用汽车拥有量',\n",
       " 'A0A0404': '城镇居民家庭平均每百户洗衣机拥有量',\n",
       " 'A0A0405': '城镇居民家庭平均每百户电冰箱拥有量',\n",
       " 'A0A0406': '城镇居民家庭平均每百户彩色电视机拥有量',\n",
       " 'A0A0407': '城镇居民家庭平均每百户计算机拥有量',\n",
       " 'A0A0408': '城镇居民家庭平均每百户组合音响拥有量',\n",
       " 'A0A0409': '城镇居民家庭平均每百户摄像机拥有量',\n",
       " 'A0A040A': '城镇居民家庭平均每百户照相机拥有量',\n",
       " 'A0A040B': '城镇居民家庭平均每百户钢琴拥有量',\n",
       " 'A0A040C': '城镇居民家庭平均每百户其他中高档乐器拥有量',\n",
       " 'A0A040D': '城镇居民家庭平均每百户微波炉拥有量',\n",
       " 'A0A040E': '城镇居民家庭平均每百户空调拥有量',\n",
       " 'A0A040F': '城镇居民家庭平均每百户淋浴热水器拥有量',\n",
       " 'A0A040G': '城镇居民家庭平均每百户消毒碗柜拥有量',\n",
       " 'A0A040H': '城镇居民家庭平均每百户洗碗机拥有量',\n",
       " 'A0A040I': '城镇居民家庭平均每百户健身器材拥有量',\n",
       " 'A0A040J': '城镇居民家庭平均每百户固定电话拥有量',\n",
       " 'A0A040K': '城镇居民家庭平均每百户移动电话拥有量',\n",
       " 'A0A0501': '农村居民家庭人均纯收入',\n",
       " 'A0A0502': '农村居民家庭人均工资性纯收入',\n",
       " 'A0A0503': '农村居民家庭人均家庭经营纯收入',\n",
       " 'A0A0504': '农村居民家庭人均财产性纯收入',\n",
       " 'A0A0505': '农村居民家庭人均转移性纯收入',\n",
       " 'A0A0601': '农村居民家庭平均每人消费支出',\n",
       " 'A0A0602': '农村居民家庭平均每人食品消费支出',\n",
       " 'A0A0603': '农村居民家庭平均每人衣着消费支出',\n",
       " 'A0A0604': '农村居民家庭平均每人居住消费支出',\n",
       " 'A0A0605': '农村居民家庭平均每人家庭设备及用品消费支出',\n",
       " 'A0A0606': '农村居民家庭平均每人交通通信消费支出',\n",
       " 'A0A0607': '农村居民家庭平均每人文教娱乐消费支出',\n",
       " 'A0A0608': '农村居民家庭平均每人医疗保健消费支出',\n",
       " 'A0A0609': '农村居民家庭平均每人其他消费支出',\n",
       " 'A0A0901': '农村居民家庭平均每百户洗衣机拥有量',\n",
       " 'A0A0902': '农村居民家庭平均每百户电冰箱拥有量',\n",
       " 'A0A0903': '农村居民家庭平均每百户空调拥有量',\n",
       " 'A0A0904': '农村居民家庭平均每百户抽油烟机拥有量',\n",
       " 'A0A0905': '农村居民家庭平均每百户自行车拥有量',\n",
       " 'A0A0906': '农村居民家庭平均每百户摩托车拥有量',\n",
       " 'A0A0907': '农村居民家庭平均每百户固定电话拥有量',\n",
       " 'A0A0908': '农村居民家庭平均每百户移动电话拥有量',\n",
       " 'A0A0909': '农村居民家庭平均每百户黑白电视机拥有量',\n",
       " 'A0A090A': '农村居民家庭平均每百户彩色电视机拥有量',\n",
       " 'A0A090B': '农村居民家庭平均每百户照相机拥有量',\n",
       " 'A0A090C': '农村居民家庭平均每百户计算机拥有量',\n",
       " 'A0A0A01': '农村居民人均住房面积',\n",
       " 'A0A0A02': '农村居民家庭住房价值',\n",
       " 'A0A0A03': '农村居民家庭住房钢筋混凝土结构',\n",
       " 'A0A0A04': '农村居民家庭住房砖木结构',\n",
       " 'A0B0101': '全部地级及以上城市数',\n",
       " 'A0B0102': '城市市辖区年末总人口为400万以上的地级及以上城市数',\n",
       " 'A0B0103': '城市市辖区年末总人口为200-400万的地级及以上城市数',\n",
       " 'A0B0104': '城市市辖区年末总人口为100-200万的地级及以上城市数',\n",
       " 'A0B0105': '城市市辖区年末总人口为50-100万的地级及以上城市数',\n",
       " 'A0B0106': '城市市辖区年末总人口为20-50万的地级及以上城市数',\n",
       " 'A0B0107': '城市市辖区年末总人口为20万以下的地级及以上城市数',\n",
       " 'A0B0201': '城区面积',\n",
       " ...}"
      ]
     },
     "execution_count": 21,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# A-0 创建指标字典\n",
    "指标字典 = df_m['cname'].to_dict()\n",
    "指标字典"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 23,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>i</th>\n",
       "      <th>dbcode</th>\n",
       "      <th>exp</th>\n",
       "      <th>id</th>\n",
       "      <th>isParent</th>\n",
       "      <th>name</th>\n",
       "      <th>open</th>\n",
       "      <th>pid</th>\n",
       "      <th>wd</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>0</td>\n",
       "      <td>fsnd</td>\n",
       "      <td></td>\n",
       "      <td>110000</td>\n",
       "      <td>True</td>\n",
       "      <td>北京市</td>\n",
       "      <td>False</td>\n",
       "      <td>100001</td>\n",
       "      <td>reg</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>1</td>\n",
       "      <td>fsnd</td>\n",
       "      <td></td>\n",
       "      <td>120000</td>\n",
       "      <td>True</td>\n",
       "      <td>天津市</td>\n",
       "      <td>False</td>\n",
       "      <td>100001</td>\n",
       "      <td>reg</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>2</td>\n",
       "      <td>fsnd</td>\n",
       "      <td></td>\n",
       "      <td>130000</td>\n",
       "      <td>True</td>\n",
       "      <td>河北省</td>\n",
       "      <td>False</td>\n",
       "      <td>100001</td>\n",
       "      <td>reg</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>3</td>\n",
       "      <td>fsnd</td>\n",
       "      <td></td>\n",
       "      <td>140000</td>\n",
       "      <td>True</td>\n",
       "      <td>山西省</td>\n",
       "      <td>False</td>\n",
       "      <td>100001</td>\n",
       "      <td>reg</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>4</td>\n",
       "      <td>fsnd</td>\n",
       "      <td></td>\n",
       "      <td>150000</td>\n",
       "      <td>True</td>\n",
       "      <td>内蒙古自治区</td>\n",
       "      <td>False</td>\n",
       "      <td>100001</td>\n",
       "      <td>reg</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "   i dbcode exp      id  isParent    name   open     pid   wd\n",
       "0  0   fsnd      110000      True     北京市  False  100001  reg\n",
       "1  1   fsnd      120000      True     天津市  False  100001  reg\n",
       "2  2   fsnd      130000      True     河北省  False  100001  reg\n",
       "3  3   fsnd      140000      True     山西省  False  100001  reg\n",
       "4  4   fsnd      150000      True  内蒙古自治区  False  100001  reg"
      ]
     },
     "execution_count": 23,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df_r.head()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 38,
   "metadata": {
    "scrolled": true
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "{110000: '北京市',\n",
       " 120000: '天津市',\n",
       " 130000: '河北省',\n",
       " 140000: '山西省',\n",
       " 150000: '内蒙古自治区',\n",
       " 210000: '辽宁省',\n",
       " 220000: '吉林省',\n",
       " 230000: '黑龙江省',\n",
       " 310000: '上海市',\n",
       " 320000: '江苏省',\n",
       " 330000: '浙江省',\n",
       " 340000: '安徽省',\n",
       " 350000: '福建省',\n",
       " 360000: '江西省',\n",
       " 370000: '山东省',\n",
       " 410000: '河南省',\n",
       " 420000: '湖北省',\n",
       " 430000: '湖南省',\n",
       " 440000: '广东省',\n",
       " 450000: '广西壮族自治区',\n",
       " 460000: '海南省',\n",
       " 500000: '重庆市',\n",
       " 510000: '四川省',\n",
       " 520000: '贵州省',\n",
       " 530000: '云南省',\n",
       " 540000: '西藏自治区',\n",
       " 610000: '陕西省',\n",
       " 620000: '甘肃省',\n",
       " 630000: '青海省',\n",
       " 640000: '宁夏回族自治区',\n",
       " 650000: '新疆维吾尔自治区'}"
      ]
     },
     "execution_count": 38,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# A-1 创建地区字典\n",
    "# set_index(\"\")以xx为索引  reset_index不要索引\n",
    "地区字典 = df_r.set_index(\"id\")['name'].to_dict()\n",
    "地区字典"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## 使用字典进行数据框转换"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 41,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th>data</th>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>zb</th>\n",
       "      <th>reg</th>\n",
       "      <th>sj</th>\n",
       "      <th></th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th rowspan=\"5\" valign=\"top\">A010101</th>\n",
       "      <th rowspan=\"5\" valign=\"top\">110000</th>\n",
       "      <th>2018</th>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2017</th>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2016</th>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2015</th>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2014</th>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>...</th>\n",
       "      <th>...</th>\n",
       "      <th>...</th>\n",
       "      <td>...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th rowspan=\"5\" valign=\"top\">A0S0B05</th>\n",
       "      <th rowspan=\"5\" valign=\"top\">650000</th>\n",
       "      <th>2013</th>\n",
       "      <td>33.856600</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2012</th>\n",
       "      <td>24.914044</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2011</th>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2010</th>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2009</th>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "<p>908300 rows × 1 columns</p>\n",
       "</div>"
      ],
      "text/plain": [
       "                          data\n",
       "zb      reg    sj             \n",
       "A010101 110000 2018        NaN\n",
       "               2017        NaN\n",
       "               2016        NaN\n",
       "               2015        NaN\n",
       "               2014        NaN\n",
       "...                        ...\n",
       "A0S0B05 650000 2013  33.856600\n",
       "               2012  24.914044\n",
       "               2011        NaN\n",
       "               2010        NaN\n",
       "               2009        NaN\n",
       "\n",
       "[908300 rows x 1 columns]"
      ]
     },
     "execution_count": 41,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df_raw"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 42,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>reg</th>\n",
       "      <th>sj</th>\n",
       "      <th>data</th>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>zb</th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>地级区划数</th>\n",
       "      <td>110000</td>\n",
       "      <td>2018</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>地级区划数</th>\n",
       "      <td>110000</td>\n",
       "      <td>2017</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>地级区划数</th>\n",
       "      <td>110000</td>\n",
       "      <td>2016</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>地级区划数</th>\n",
       "      <td>110000</td>\n",
       "      <td>2015</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>地级区划数</th>\n",
       "      <td>110000</td>\n",
       "      <td>2014</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>...</th>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>城乡居民社会养老保险累计结余</th>\n",
       "      <td>650000</td>\n",
       "      <td>2013</td>\n",
       "      <td>33.856600</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>城乡居民社会养老保险累计结余</th>\n",
       "      <td>650000</td>\n",
       "      <td>2012</td>\n",
       "      <td>24.914044</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>城乡居民社会养老保险累计结余</th>\n",
       "      <td>650000</td>\n",
       "      <td>2011</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>城乡居民社会养老保险累计结余</th>\n",
       "      <td>650000</td>\n",
       "      <td>2010</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>城乡居民社会养老保险累计结余</th>\n",
       "      <td>650000</td>\n",
       "      <td>2009</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "<p>908300 rows × 3 columns</p>\n",
       "</div>"
      ],
      "text/plain": [
       "                   reg    sj       data\n",
       "zb                                     \n",
       "地级区划数           110000  2018        NaN\n",
       "地级区划数           110000  2017        NaN\n",
       "地级区划数           110000  2016        NaN\n",
       "地级区划数           110000  2015        NaN\n",
       "地级区划数           110000  2014        NaN\n",
       "...                ...   ...        ...\n",
       "城乡居民社会养老保险累计结余  650000  2013  33.856600\n",
       "城乡居民社会养老保险累计结余  650000  2012  24.914044\n",
       "城乡居民社会养老保险累计结余  650000  2011        NaN\n",
       "城乡居民社会养老保险累计结余  650000  2010        NaN\n",
       "城乡居民社会养老保险累计结余  650000  2009        NaN\n",
       "\n",
       "[908300 rows x 3 columns]"
      ]
     },
     "execution_count": 42,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# rename(index=指标字典) 将0、1、2、3这样编码形式的索引变成指标字典\n",
    "df_raw = df_raw.reset_index().set_index(\"zb\").rename(index=指标字典)\n",
    "df_raw"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 72,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>zb</th>\n",
       "      <th>sj</th>\n",
       "      <th>data</th>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>reg</th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>北京市</th>\n",
       "      <td>地级区划数</td>\n",
       "      <td>2018</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>北京市</th>\n",
       "      <td>地级区划数</td>\n",
       "      <td>2017</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>北京市</th>\n",
       "      <td>地级区划数</td>\n",
       "      <td>2016</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>北京市</th>\n",
       "      <td>地级区划数</td>\n",
       "      <td>2015</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>北京市</th>\n",
       "      <td>地级区划数</td>\n",
       "      <td>2014</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>...</th>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>新疆维吾尔自治区</th>\n",
       "      <td>城乡居民社会养老保险累计结余</td>\n",
       "      <td>2013</td>\n",
       "      <td>33.856600</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>新疆维吾尔自治区</th>\n",
       "      <td>城乡居民社会养老保险累计结余</td>\n",
       "      <td>2012</td>\n",
       "      <td>24.914044</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>新疆维吾尔自治区</th>\n",
       "      <td>城乡居民社会养老保险累计结余</td>\n",
       "      <td>2011</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>新疆维吾尔自治区</th>\n",
       "      <td>城乡居民社会养老保险累计结余</td>\n",
       "      <td>2010</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>新疆维吾尔自治区</th>\n",
       "      <td>城乡居民社会养老保险累计结余</td>\n",
       "      <td>2009</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "<p>908300 rows × 3 columns</p>\n",
       "</div>"
      ],
      "text/plain": [
       "                      zb    sj       data\n",
       "reg                                      \n",
       "北京市                地级区划数  2018        NaN\n",
       "北京市                地级区划数  2017        NaN\n",
       "北京市                地级区划数  2016        NaN\n",
       "北京市                地级区划数  2015        NaN\n",
       "北京市                地级区划数  2014        NaN\n",
       "...                  ...   ...        ...\n",
       "新疆维吾尔自治区  城乡居民社会养老保险累计结余  2013  33.856600\n",
       "新疆维吾尔自治区  城乡居民社会养老保险累计结余  2012  24.914044\n",
       "新疆维吾尔自治区  城乡居民社会养老保险累计结余  2011        NaN\n",
       "新疆维吾尔自治区  城乡居民社会养老保险累计结余  2010        NaN\n",
       "新疆维吾尔自治区  城乡居民社会养老保险累计结余  2009        NaN\n",
       "\n",
       "[908300 rows x 3 columns]"
      ]
     },
     "execution_count": 72,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# A-3-1 地区字典==> reg地区\n",
    "df_raw = df_raw.reset_index().set_index(\"reg\").rename(index=地区字典)\n",
    "df_raw"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 73,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>地区</th>\n",
       "      <th>指标</th>\n",
       "      <th>年</th>\n",
       "      <th>数据</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>北京市</td>\n",
       "      <td>地级区划数</td>\n",
       "      <td>2018</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>北京市</td>\n",
       "      <td>地级区划数</td>\n",
       "      <td>2017</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>北京市</td>\n",
       "      <td>地级区划数</td>\n",
       "      <td>2016</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>北京市</td>\n",
       "      <td>地级区划数</td>\n",
       "      <td>2015</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>北京市</td>\n",
       "      <td>地级区划数</td>\n",
       "      <td>2014</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>...</th>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>908295</th>\n",
       "      <td>新疆维吾尔自治区</td>\n",
       "      <td>城乡居民社会养老保险累计结余</td>\n",
       "      <td>2013</td>\n",
       "      <td>33.856600</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>908296</th>\n",
       "      <td>新疆维吾尔自治区</td>\n",
       "      <td>城乡居民社会养老保险累计结余</td>\n",
       "      <td>2012</td>\n",
       "      <td>24.914044</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>908297</th>\n",
       "      <td>新疆维吾尔自治区</td>\n",
       "      <td>城乡居民社会养老保险累计结余</td>\n",
       "      <td>2011</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>908298</th>\n",
       "      <td>新疆维吾尔自治区</td>\n",
       "      <td>城乡居民社会养老保险累计结余</td>\n",
       "      <td>2010</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>908299</th>\n",
       "      <td>新疆维吾尔自治区</td>\n",
       "      <td>城乡居民社会养老保险累计结余</td>\n",
       "      <td>2009</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "<p>908300 rows × 4 columns</p>\n",
       "</div>"
      ],
      "text/plain": [
       "              地区              指标     年         数据\n",
       "0            北京市           地级区划数  2018        NaN\n",
       "1            北京市           地级区划数  2017        NaN\n",
       "2            北京市           地级区划数  2016        NaN\n",
       "3            北京市           地级区划数  2015        NaN\n",
       "4            北京市           地级区划数  2014        NaN\n",
       "...          ...             ...   ...        ...\n",
       "908295  新疆维吾尔自治区  城乡居民社会养老保险累计结余  2013  33.856600\n",
       "908296  新疆维吾尔自治区  城乡居民社会养老保险累计结余  2012  24.914044\n",
       "908297  新疆维吾尔自治区  城乡居民社会养老保险累计结余  2011        NaN\n",
       "908298  新疆维吾尔自治区  城乡居民社会养老保险累计结余  2010        NaN\n",
       "908299  新疆维吾尔自治区  城乡居民社会养老保险累计结余  2009        NaN\n",
       "\n",
       "[908300 rows x 4 columns]"
      ]
     },
     "execution_count": 73,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df_zh = df_raw.reset_index().rename(columns={\"zb\":\"指标\",\"reg\":\"地区\",\"sj\":\"年\",\"data\":\"数据\",})\n",
    "df_zh"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## 切数据：实现快速查找\n",
    "- df.loc[行,列]切片"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### 按问题意识去切数据\n",
    "- 按行业分城镇单位就业人员，全国各地区的历年变化之统计值（大小、平均等）\n",
    "- 分进合击"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 74,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>年</th>\n",
       "      <th>数据</th>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>指标</th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>城镇单位就业人员工资总额</th>\n",
       "      <td>2018</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>城镇单位就业人员工资总额</th>\n",
       "      <td>2017</td>\n",
       "      <td>10675.97363</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>城镇单位就业人员工资总额</th>\n",
       "      <td>2016</td>\n",
       "      <td>9463.26084</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>城镇单位就业人员工资总额</th>\n",
       "      <td>2015</td>\n",
       "      <td>8643.54357</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>城镇单位就业人员工资总额</th>\n",
       "      <td>2014</td>\n",
       "      <td>7687.60206</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>...</th>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>城镇单位就业人员工资总额</th>\n",
       "      <td>2013</td>\n",
       "      <td>1674.73486</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>城镇单位就业人员工资总额</th>\n",
       "      <td>2012</td>\n",
       "      <td>1388.13884</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>城镇单位就业人员工资总额</th>\n",
       "      <td>2011</td>\n",
       "      <td>1124.58182</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>城镇单位就业人员工资总额</th>\n",
       "      <td>2010</td>\n",
       "      <td>850.80000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>城镇单位就业人员工资总额</th>\n",
       "      <td>2009</td>\n",
       "      <td>715.06764</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "<p>620 rows × 2 columns</p>\n",
       "</div>"
      ],
      "text/plain": [
       "                 年           数据\n",
       "指标                             \n",
       "城镇单位就业人员工资总额  2018          NaN\n",
       "城镇单位就业人员工资总额  2017  10675.97363\n",
       "城镇单位就业人员工资总额  2016   9463.26084\n",
       "城镇单位就业人员工资总额  2015   8643.54357\n",
       "城镇单位就业人员工资总额  2014   7687.60206\n",
       "...            ...          ...\n",
       "城镇单位就业人员工资总额  2013   1674.73486\n",
       "城镇单位就业人员工资总额  2012   1388.13884\n",
       "城镇单位就业人员工资总额  2011   1124.58182\n",
       "城镇单位就业人员工资总额  2010    850.80000\n",
       "城镇单位就业人员工资总额  2009    715.06764\n",
       "\n",
       "[620 rows x 2 columns]"
      ]
     },
     "execution_count": 74,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# 方法一\n",
    "# set_index()让指标成为索引值\n",
    "df_zh.set_index(\"指标\").loc[\"城镇单位就业人员工资总额\",\"年\":\"数据\"]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 75,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>地区</th>\n",
       "      <th>指标</th>\n",
       "      <th>年</th>\n",
       "      <th>数据</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>19530</th>\n",
       "      <td>北京市</td>\n",
       "      <td>城镇单位就业人员</td>\n",
       "      <td>2018</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>19531</th>\n",
       "      <td>北京市</td>\n",
       "      <td>城镇单位就业人员</td>\n",
       "      <td>2017</td>\n",
       "      <td>812.8589</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>19532</th>\n",
       "      <td>北京市</td>\n",
       "      <td>城镇单位就业人员</td>\n",
       "      <td>2016</td>\n",
       "      <td>791.5197</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>19533</th>\n",
       "      <td>北京市</td>\n",
       "      <td>城镇单位就业人员</td>\n",
       "      <td>2015</td>\n",
       "      <td>777.3448</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>19534</th>\n",
       "      <td>北京市</td>\n",
       "      <td>城镇单位就业人员</td>\n",
       "      <td>2014</td>\n",
       "      <td>755.8601</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>...</th>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>56725</th>\n",
       "      <td>新疆维吾尔自治区</td>\n",
       "      <td>公共管理和社会组织城镇单位就业人员平均工资</td>\n",
       "      <td>2013</td>\n",
       "      <td>46636.0000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>56726</th>\n",
       "      <td>新疆维吾尔自治区</td>\n",
       "      <td>公共管理和社会组织城镇单位就业人员平均工资</td>\n",
       "      <td>2012</td>\n",
       "      <td>45071.0000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>56727</th>\n",
       "      <td>新疆维吾尔自治区</td>\n",
       "      <td>公共管理和社会组织城镇单位就业人员平均工资</td>\n",
       "      <td>2011</td>\n",
       "      <td>39862.0000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>56728</th>\n",
       "      <td>新疆维吾尔自治区</td>\n",
       "      <td>公共管理和社会组织城镇单位就业人员平均工资</td>\n",
       "      <td>2010</td>\n",
       "      <td>35950.0000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>56729</th>\n",
       "      <td>新疆维吾尔自治区</td>\n",
       "      <td>公共管理和社会组织城镇单位就业人员平均工资</td>\n",
       "      <td>2009</td>\n",
       "      <td>31217.0000</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "<p>22940 rows × 4 columns</p>\n",
       "</div>"
      ],
      "text/plain": [
       "             地区                     指标     年          数据\n",
       "19530       北京市               城镇单位就业人员  2018         NaN\n",
       "19531       北京市               城镇单位就业人员  2017    812.8589\n",
       "19532       北京市               城镇单位就业人员  2016    791.5197\n",
       "19533       北京市               城镇单位就业人员  2015    777.3448\n",
       "19534       北京市               城镇单位就业人员  2014    755.8601\n",
       "...         ...                    ...   ...         ...\n",
       "56725  新疆维吾尔自治区  公共管理和社会组织城镇单位就业人员平均工资  2013  46636.0000\n",
       "56726  新疆维吾尔自治区  公共管理和社会组织城镇单位就业人员平均工资  2012  45071.0000\n",
       "56727  新疆维吾尔自治区  公共管理和社会组织城镇单位就业人员平均工资  2011  39862.0000\n",
       "56728  新疆维吾尔自治区  公共管理和社会组织城镇单位就业人员平均工资  2010  35950.0000\n",
       "56729  新疆维吾尔自治区  公共管理和社会组织城镇单位就业人员平均工资  2009  31217.0000\n",
       "\n",
       "[22940 rows x 4 columns]"
      ]
     },
     "execution_count": 75,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# 方法二\n",
    "dslice = df_zh [ df_zh.指标.str.contains(\"城镇单位就业人员\") ]\n",
    "dslice"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 76,
   "metadata": {
    "scrolled": true
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array(['城镇单位就业人员', '农林牧渔业城镇单位就业人员', '采矿业城镇单位就业人员', '制造业城镇单位就业人员',\n",
       "       '电力、燃气及水的生产和供应业城镇单位就业人员', '建筑业城镇单位就业人员', '交通运输、仓储及邮电通信业城镇单位就业人员',\n",
       "       '信息传输、计算机服务和软件业城镇单位就业人员', '批发和零售业城镇单位就业人员', '住宿和餐饮业城镇单位就业人员',\n",
       "       '金融业城镇单位就业人员', '房地产业城镇单位就业人员', '租赁和商务服务业城镇单位就业人员',\n",
       "       '科学研究、技术服务和地质勘查业城镇单位就业人员', '水利、环境和公共设施管理业城镇单位就业人员',\n",
       "       '居民服务和其他服务业城镇单位就业人员', '教育业城镇单位就业人员', '卫生、社会保障和社会福利业城镇单位就业人员',\n",
       "       '文化、体育和娱乐业城镇单位就业人员', '公共管理和社会组织城镇单位就业人员', '城镇单位就业人员工资总额',\n",
       "       '国有城镇单位就业人员工资总额', '其他城镇单位就业人员工资总额', '城镇单位就业人员工资总额指数(上年=100)',\n",
       "       '国有城镇单位就业人员工资总额指数(上年=100)', '其他城镇单位就业人员工资总额指数(上年=100)',\n",
       "       '城镇单位就业人员平均工资', '城镇单位就业人员平均货币工资指数(上年=100)',\n",
       "       '国有城镇单位就业人员平均货币工资指数(上年=100)', '其他城镇单位就业人员平均货币工资指数(上年=100)',\n",
       "       '城镇单位就业人员平均实际工资指数(上年=100)', '国有城镇单位就业人员平均实际工资指数(上年=100)',\n",
       "       '其他城镇单位就业人员平均实际工资指数(上年=100)', '农、林、牧、渔业城镇单位就业人员工资总额',\n",
       "       '采矿业城镇单位就业人员工资总额', '制造业城镇单位就业人员工资总额', '电力、燃气及水的生产和供应业城镇单位就业人员工资总额',\n",
       "       '建筑业城镇单位就业人员工资总额', '交通运输、仓储和邮政业城镇单位就业人员工资总额',\n",
       "       '信息传输、计算机服务和软件业城镇单位就业人员工资总额', '批发和零售业城镇单位就业人员工资总额',\n",
       "       '住宿和餐饮业城镇单位就业人员工资总额', '金融业城镇单位就业人员工资总额', '房地产业城镇单位就业人员工资总额',\n",
       "       '租赁和商务服务业城镇单位就业人员工资总额', '科学研究、技术服务和地质勘查业城镇单位就业人员工资总额',\n",
       "       '水利、环境和公共设施管理业城镇单位就业人员工资总额', '居民服务和其他服务业城镇单位就业人员工资总额',\n",
       "       '教育城镇单位就业人员工资总额', '卫生、社会保障和社会福利业城镇单位就业人员工资总额',\n",
       "       '文化、体育和娱乐业城镇单位就业人员工资总额', '公共管理和社会组织城镇单位就业人员工资总额',\n",
       "       '农、林、牧、渔业城镇单位就业人员平均工资', '采矿业城镇单位就业人员平均工资', '制造业城镇单位就业人员平均工资',\n",
       "       '电力、燃气及水的生产和供应业城镇单位就业人员平均工资', '建筑业城镇单位就业人员平均工资',\n",
       "       '交通运输、仓储和邮政业城镇单位就业人员平均工资', '信息传输、计算机服务和软件业城镇单位就业人员平均工资',\n",
       "       '批发和零售业城镇单位就业人员平均工资', '住宿和餐饮业城镇单位就业人员平均工资', '金融业城镇单位就业人员平均工资',\n",
       "       '房地产业城镇单位就业人员平均工资', '租赁和商务服务业城镇单位就业人员平均工资',\n",
       "       '科学研究、技术服务和地质勘查业城镇单位就业人员平均工资', '水利、环境和公共设施管理业城镇单位就业人员平均工资',\n",
       "       '居民服务和其他服务业城镇单位就业人员平均工资', '教育城镇单位就业人员平均工资',\n",
       "       '卫生、社会保障和社会福利业城镇单位就业人员平均工资', '文化、体育和娱乐业城镇单位就业人员平均工资',\n",
       "       '公共管理和社会组织城镇单位就业人员平均工资'], dtype=object)"
      ]
     },
     "execution_count": 76,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# B-2 思考“分”进合计之分的可能性\n",
    "# unique()列出所有指标信息\n",
    "指标分的可能性 = dslice.指标.unique()\n",
    "指标分的可能性\n",
    "# 有结构的==>行业+城镇单位就业+就业人员or人员工资总额"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 77,
   "metadata": {
    "scrolled": true
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "[['', '人员'],\n",
       " ['农林牧渔业', '人员'],\n",
       " ['采矿业', '人员'],\n",
       " ['制造业', '人员'],\n",
       " ['电力、燃气及水的生产和供应业', '人员'],\n",
       " ['建筑业', '人员'],\n",
       " ['交通运输、仓储及邮电通信业', '人员'],\n",
       " ['信息传输、计算机服务和软件业', '人员'],\n",
       " ['批发和零售业', '人员'],\n",
       " ['住宿和餐饮业', '人员'],\n",
       " ['金融业', '人员'],\n",
       " ['房地产业', '人员'],\n",
       " ['租赁和商务服务业', '人员'],\n",
       " ['科学研究、技术服务和地质勘查业', '人员'],\n",
       " ['水利、环境和公共设施管理业', '人员'],\n",
       " ['居民服务和其他服务业', '人员'],\n",
       " ['教育业', '人员'],\n",
       " ['卫生、社会保障和社会福利业', '人员'],\n",
       " ['文化、体育和娱乐业', '人员'],\n",
       " ['公共管理和社会组织', '人员'],\n",
       " ['', '人员工资总额'],\n",
       " ['国有', '人员工资总额'],\n",
       " ['其他', '人员工资总额'],\n",
       " ['', '人员工资总额指数(上年=100)'],\n",
       " ['国有', '人员工资总额指数(上年=100)'],\n",
       " ['其他', '人员工资总额指数(上年=100)'],\n",
       " ['', '人员平均工资'],\n",
       " ['', '人员平均货币工资指数(上年=100)'],\n",
       " ['国有', '人员平均货币工资指数(上年=100)'],\n",
       " ['其他', '人员平均货币工资指数(上年=100)'],\n",
       " ['', '人员平均实际工资指数(上年=100)'],\n",
       " ['国有', '人员平均实际工资指数(上年=100)'],\n",
       " ['其他', '人员平均实际工资指数(上年=100)'],\n",
       " ['农、林、牧、渔业', '人员工资总额'],\n",
       " ['采矿业', '人员工资总额'],\n",
       " ['制造业', '人员工资总额'],\n",
       " ['电力、燃气及水的生产和供应业', '人员工资总额'],\n",
       " ['建筑业', '人员工资总额'],\n",
       " ['交通运输、仓储和邮政业', '人员工资总额'],\n",
       " ['信息传输、计算机服务和软件业', '人员工资总额'],\n",
       " ['批发和零售业', '人员工资总额'],\n",
       " ['住宿和餐饮业', '人员工资总额'],\n",
       " ['金融业', '人员工资总额'],\n",
       " ['房地产业', '人员工资总额'],\n",
       " ['租赁和商务服务业', '人员工资总额'],\n",
       " ['科学研究、技术服务和地质勘查业', '人员工资总额'],\n",
       " ['水利、环境和公共设施管理业', '人员工资总额'],\n",
       " ['居民服务和其他服务业', '人员工资总额'],\n",
       " ['教育', '人员工资总额'],\n",
       " ['卫生、社会保障和社会福利业', '人员工资总额'],\n",
       " ['文化、体育和娱乐业', '人员工资总额'],\n",
       " ['公共管理和社会组织', '人员工资总额'],\n",
       " ['农、林、牧、渔业', '人员平均工资'],\n",
       " ['采矿业', '人员平均工资'],\n",
       " ['制造业', '人员平均工资'],\n",
       " ['电力、燃气及水的生产和供应业', '人员平均工资'],\n",
       " ['建筑业', '人员平均工资'],\n",
       " ['交通运输、仓储和邮政业', '人员平均工资'],\n",
       " ['信息传输、计算机服务和软件业', '人员平均工资'],\n",
       " ['批发和零售业', '人员平均工资'],\n",
       " ['住宿和餐饮业', '人员平均工资'],\n",
       " ['金融业', '人员平均工资'],\n",
       " ['房地产业', '人员平均工资'],\n",
       " ['租赁和商务服务业', '人员平均工资'],\n",
       " ['科学研究、技术服务和地质勘查业', '人员平均工资'],\n",
       " ['水利、环境和公共设施管理业', '人员平均工资'],\n",
       " ['居民服务和其他服务业', '人员平均工资'],\n",
       " ['教育', '人员平均工资'],\n",
       " ['卫生、社会保障和社会福利业', '人员平均工资'],\n",
       " ['文化、体育和娱乐业', '人员平均工资'],\n",
       " ['公共管理和社会组织', '人员平均工资']]"
      ]
     },
     "execution_count": 77,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# split拆分结构 用循环遍历方式\n",
    "指标分的可能性 = [x.split(\"城镇单位就业\") for x in dslice.指标.unique()]\n",
    "指标分的可能性"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 78,
   "metadata": {
    "collapsed": true
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "[['农林牧渔业', '人员'],\n",
       " ['采矿业', '人员'],\n",
       " ['制造业', '人员'],\n",
       " ['电力、燃气及水的生产和供应业', '人员'],\n",
       " ['建筑业', '人员'],\n",
       " ['交通运输、仓储及邮电通信业', '人员'],\n",
       " ['信息传输、计算机服务和软件业', '人员'],\n",
       " ['批发和零售业', '人员'],\n",
       " ['住宿和餐饮业', '人员'],\n",
       " ['金融业', '人员'],\n",
       " ['房地产业', '人员'],\n",
       " ['租赁和商务服务业', '人员'],\n",
       " ['科学研究、技术服务和地质勘查业', '人员'],\n",
       " ['水利、环境和公共设施管理业', '人员'],\n",
       " ['居民服务和其他服务业', '人员'],\n",
       " ['教育业', '人员'],\n",
       " ['卫生、社会保障和社会福利业', '人员'],\n",
       " ['文化、体育和娱乐业', '人员'],\n",
       " ['公共管理和社会组织', '人员'],\n",
       " ['国有', '人员工资总额'],\n",
       " ['其他', '人员工资总额'],\n",
       " ['国有', '人员工资总额指数(上年=100)'],\n",
       " ['其他', '人员工资总额指数(上年=100)'],\n",
       " ['国有', '人员平均货币工资指数(上年=100)'],\n",
       " ['其他', '人员平均货币工资指数(上年=100)'],\n",
       " ['国有', '人员平均实际工资指数(上年=100)'],\n",
       " ['其他', '人员平均实际工资指数(上年=100)'],\n",
       " ['农、林、牧、渔业', '人员工资总额'],\n",
       " ['采矿业', '人员工资总额'],\n",
       " ['制造业', '人员工资总额'],\n",
       " ['电力、燃气及水的生产和供应业', '人员工资总额'],\n",
       " ['建筑业', '人员工资总额'],\n",
       " ['交通运输、仓储和邮政业', '人员工资总额'],\n",
       " ['信息传输、计算机服务和软件业', '人员工资总额'],\n",
       " ['批发和零售业', '人员工资总额'],\n",
       " ['住宿和餐饮业', '人员工资总额'],\n",
       " ['金融业', '人员工资总额'],\n",
       " ['房地产业', '人员工资总额'],\n",
       " ['租赁和商务服务业', '人员工资总额'],\n",
       " ['科学研究、技术服务和地质勘查业', '人员工资总额'],\n",
       " ['水利、环境和公共设施管理业', '人员工资总额'],\n",
       " ['居民服务和其他服务业', '人员工资总额'],\n",
       " ['教育', '人员工资总额'],\n",
       " ['卫生、社会保障和社会福利业', '人员工资总额'],\n",
       " ['文化、体育和娱乐业', '人员工资总额'],\n",
       " ['公共管理和社会组织', '人员工资总额'],\n",
       " ['农、林、牧、渔业', '人员平均工资'],\n",
       " ['采矿业', '人员平均工资'],\n",
       " ['制造业', '人员平均工资'],\n",
       " ['电力、燃气及水的生产和供应业', '人员平均工资'],\n",
       " ['建筑业', '人员平均工资'],\n",
       " ['交通运输、仓储和邮政业', '人员平均工资'],\n",
       " ['信息传输、计算机服务和软件业', '人员平均工资'],\n",
       " ['批发和零售业', '人员平均工资'],\n",
       " ['住宿和餐饮业', '人员平均工资'],\n",
       " ['金融业', '人员平均工资'],\n",
       " ['房地产业', '人员平均工资'],\n",
       " ['租赁和商务服务业', '人员平均工资'],\n",
       " ['科学研究、技术服务和地质勘查业', '人员平均工资'],\n",
       " ['水利、环境和公共设施管理业', '人员平均工资'],\n",
       " ['居民服务和其他服务业', '人员平均工资'],\n",
       " ['教育', '人员平均工资'],\n",
       " ['卫生、社会保障和社会福利业', '人员平均工资'],\n",
       " ['文化、体育和娱乐业', '人员平均工资'],\n",
       " ['公共管理和社会组织', '人员平均工资']]"
      ]
     },
     "execution_count": 78,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# 只取‘人员’，‘人员平均工资’\n",
    "指标分的可能性_取 = [ [x,y] for (x,y) in 指标分的可能性 if (y == '人员平均工资' or '人员') and x != '']\n",
    "指标分的可能性_取"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 79,
   "metadata": {
    "scrolled": true
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "['农林牧渔业城镇单位就业人员',\n",
       " '采矿业城镇单位就业人员',\n",
       " '制造业城镇单位就业人员',\n",
       " '电力、燃气及水的生产和供应业城镇单位就业人员',\n",
       " '建筑业城镇单位就业人员',\n",
       " '交通运输、仓储及邮电通信业城镇单位就业人员',\n",
       " '信息传输、计算机服务和软件业城镇单位就业人员',\n",
       " '批发和零售业城镇单位就业人员',\n",
       " '住宿和餐饮业城镇单位就业人员',\n",
       " '金融业城镇单位就业人员',\n",
       " '房地产业城镇单位就业人员',\n",
       " '租赁和商务服务业城镇单位就业人员',\n",
       " '科学研究、技术服务和地质勘查业城镇单位就业人员',\n",
       " '水利、环境和公共设施管理业城镇单位就业人员',\n",
       " '居民服务和其他服务业城镇单位就业人员',\n",
       " '教育业城镇单位就业人员',\n",
       " '卫生、社会保障和社会福利业城镇单位就业人员',\n",
       " '文化、体育和娱乐业城镇单位就业人员',\n",
       " '公共管理和社会组织城镇单位就业人员',\n",
       " '国有城镇单位就业人员工资总额',\n",
       " '其他城镇单位就业人员工资总额',\n",
       " '国有城镇单位就业人员工资总额指数(上年=100)',\n",
       " '其他城镇单位就业人员工资总额指数(上年=100)',\n",
       " '国有城镇单位就业人员平均货币工资指数(上年=100)',\n",
       " '其他城镇单位就业人员平均货币工资指数(上年=100)',\n",
       " '国有城镇单位就业人员平均实际工资指数(上年=100)',\n",
       " '其他城镇单位就业人员平均实际工资指数(上年=100)',\n",
       " '农、林、牧、渔业城镇单位就业人员工资总额',\n",
       " '采矿业城镇单位就业人员工资总额',\n",
       " '制造业城镇单位就业人员工资总额',\n",
       " '电力、燃气及水的生产和供应业城镇单位就业人员工资总额',\n",
       " '建筑业城镇单位就业人员工资总额',\n",
       " '交通运输、仓储和邮政业城镇单位就业人员工资总额',\n",
       " '信息传输、计算机服务和软件业城镇单位就业人员工资总额',\n",
       " '批发和零售业城镇单位就业人员工资总额',\n",
       " '住宿和餐饮业城镇单位就业人员工资总额',\n",
       " '金融业城镇单位就业人员工资总额',\n",
       " '房地产业城镇单位就业人员工资总额',\n",
       " '租赁和商务服务业城镇单位就业人员工资总额',\n",
       " '科学研究、技术服务和地质勘查业城镇单位就业人员工资总额',\n",
       " '水利、环境和公共设施管理业城镇单位就业人员工资总额',\n",
       " '居民服务和其他服务业城镇单位就业人员工资总额',\n",
       " '教育城镇单位就业人员工资总额',\n",
       " '卫生、社会保障和社会福利业城镇单位就业人员工资总额',\n",
       " '文化、体育和娱乐业城镇单位就业人员工资总额',\n",
       " '公共管理和社会组织城镇单位就业人员工资总额',\n",
       " '农、林、牧、渔业城镇单位就业人员平均工资',\n",
       " '采矿业城镇单位就业人员平均工资',\n",
       " '制造业城镇单位就业人员平均工资',\n",
       " '电力、燃气及水的生产和供应业城镇单位就业人员平均工资',\n",
       " '建筑业城镇单位就业人员平均工资',\n",
       " '交通运输、仓储和邮政业城镇单位就业人员平均工资',\n",
       " '信息传输、计算机服务和软件业城镇单位就业人员平均工资',\n",
       " '批发和零售业城镇单位就业人员平均工资',\n",
       " '住宿和餐饮业城镇单位就业人员平均工资',\n",
       " '金融业城镇单位就业人员平均工资',\n",
       " '房地产业城镇单位就业人员平均工资',\n",
       " '租赁和商务服务业城镇单位就业人员平均工资',\n",
       " '科学研究、技术服务和地质勘查业城镇单位就业人员平均工资',\n",
       " '水利、环境和公共设施管理业城镇单位就业人员平均工资',\n",
       " '居民服务和其他服务业城镇单位就业人员平均工资',\n",
       " '教育城镇单位就业人员平均工资',\n",
       " '卫生、社会保障和社会福利业城镇单位就业人员平均工资',\n",
       " '文化、体育和娱乐业城镇单位就业人员平均工资',\n",
       " '公共管理和社会组织城镇单位就业人员平均工资']"
      ]
     },
     "execution_count": 79,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# B-5 进一步切片 合并成为新指标\n",
    "指标分的可能性_取_all  = [\"城镇单位就业\".join(x) for x in 指标分的可能性_取]\n",
    "指标分的可能性_取_all"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 80,
   "metadata": {
    "scrolled": true
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>指标</th>\n",
       "      <th>地区</th>\n",
       "      <th>年</th>\n",
       "      <th>数据</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>农林牧渔业城镇单位就业人员</td>\n",
       "      <td>北京市</td>\n",
       "      <td>2018</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>农林牧渔业城镇单位就业人员</td>\n",
       "      <td>北京市</td>\n",
       "      <td>2017</td>\n",
       "      <td>3.4116</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>农林牧渔业城镇单位就业人员</td>\n",
       "      <td>北京市</td>\n",
       "      <td>2016</td>\n",
       "      <td>3.6867</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>农林牧渔业城镇单位就业人员</td>\n",
       "      <td>北京市</td>\n",
       "      <td>2015</td>\n",
       "      <td>3.8949</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>农林牧渔业城镇单位就业人员</td>\n",
       "      <td>北京市</td>\n",
       "      <td>2014</td>\n",
       "      <td>3.2331</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>...</th>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>20145</th>\n",
       "      <td>公共管理和社会组织城镇单位就业人员平均工资</td>\n",
       "      <td>新疆维吾尔自治区</td>\n",
       "      <td>2013</td>\n",
       "      <td>46636.0000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>20146</th>\n",
       "      <td>公共管理和社会组织城镇单位就业人员平均工资</td>\n",
       "      <td>新疆维吾尔自治区</td>\n",
       "      <td>2012</td>\n",
       "      <td>45071.0000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>20147</th>\n",
       "      <td>公共管理和社会组织城镇单位就业人员平均工资</td>\n",
       "      <td>新疆维吾尔自治区</td>\n",
       "      <td>2011</td>\n",
       "      <td>39862.0000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>20148</th>\n",
       "      <td>公共管理和社会组织城镇单位就业人员平均工资</td>\n",
       "      <td>新疆维吾尔自治区</td>\n",
       "      <td>2010</td>\n",
       "      <td>35950.0000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>20149</th>\n",
       "      <td>公共管理和社会组织城镇单位就业人员平均工资</td>\n",
       "      <td>新疆维吾尔自治区</td>\n",
       "      <td>2009</td>\n",
       "      <td>31217.0000</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "<p>20150 rows × 4 columns</p>\n",
       "</div>"
      ],
      "text/plain": [
       "                          指标        地区     年          数据\n",
       "0              农林牧渔业城镇单位就业人员       北京市  2018         NaN\n",
       "1              农林牧渔业城镇单位就业人员       北京市  2017      3.4116\n",
       "2              农林牧渔业城镇单位就业人员       北京市  2016      3.6867\n",
       "3              农林牧渔业城镇单位就业人员       北京市  2015      3.8949\n",
       "4              农林牧渔业城镇单位就业人员       北京市  2014      3.2331\n",
       "...                      ...       ...   ...         ...\n",
       "20145  公共管理和社会组织城镇单位就业人员平均工资  新疆维吾尔自治区  2013  46636.0000\n",
       "20146  公共管理和社会组织城镇单位就业人员平均工资  新疆维吾尔自治区  2012  45071.0000\n",
       "20147  公共管理和社会组织城镇单位就业人员平均工资  新疆维吾尔自治区  2011  39862.0000\n",
       "20148  公共管理和社会组织城镇单位就业人员平均工资  新疆维吾尔自治区  2010  35950.0000\n",
       "20149  公共管理和社会组织城镇单位就业人员平均工资  新疆维吾尔自治区  2009  31217.0000\n",
       "\n",
       "[20150 rows x 4 columns]"
      ]
     },
     "execution_count": 80,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df_就业切片 = df_zh.set_index(\"指标\").loc[指标分的可能性_取_all].reset_index()\n",
    "df_就业切片"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 81,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>指标</th>\n",
       "      <th>地区</th>\n",
       "      <th>年</th>\n",
       "      <th>数据</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>count</th>\n",
       "      <td>20150</td>\n",
       "      <td>20150</td>\n",
       "      <td>20150.000000</td>\n",
       "      <td>18122.000000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>unique</th>\n",
       "      <td>65</td>\n",
       "      <td>31</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>top</th>\n",
       "      <td>教育城镇单位就业人员工资总额</td>\n",
       "      <td>海南省</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>freq</th>\n",
       "      <td>310</td>\n",
       "      <td>650</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>mean</th>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>2013.500000</td>\n",
       "      <td>15287.684517</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>std</th>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>2.872353</td>\n",
       "      <td>27454.618264</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>min</th>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>2009.000000</td>\n",
       "      <td>0.024900</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>25%</th>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>2011.000000</td>\n",
       "      <td>17.038415</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>50%</th>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>2013.500000</td>\n",
       "      <td>107.557187</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>75%</th>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>2016.000000</td>\n",
       "      <td>28634.500000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>max</th>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>2018.000000</td>\n",
       "      <td>253637.000000</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "                    指标     地区             年             数据\n",
       "count            20150  20150  20150.000000   18122.000000\n",
       "unique              65     31           NaN            NaN\n",
       "top     教育城镇单位就业人员工资总额    海南省           NaN            NaN\n",
       "freq               310    650           NaN            NaN\n",
       "mean               NaN    NaN   2013.500000   15287.684517\n",
       "std                NaN    NaN      2.872353   27454.618264\n",
       "min                NaN    NaN   2009.000000       0.024900\n",
       "25%                NaN    NaN   2011.000000      17.038415\n",
       "50%                NaN    NaN   2013.500000     107.557187\n",
       "75%                NaN    NaN   2016.000000   28634.500000\n",
       "max                NaN    NaN   2018.000000  253637.000000"
      ]
     },
     "execution_count": 81,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df_就业切片.describe(include=\"all\")"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## 分进合击出报表"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### 分组数据"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 82,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead tr th {\n",
       "        text-align: left;\n",
       "    }\n",
       "\n",
       "    .dataframe thead tr:last-of-type th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr>\n",
       "      <th></th>\n",
       "      <th colspan=\"3\" halign=\"left\">数据</th>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th></th>\n",
       "      <th>min</th>\n",
       "      <th>mean</th>\n",
       "      <th>max</th>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>指标</th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>交通运输、仓储及邮电通信业城镇单位就业人员</th>\n",
       "      <td>0.59970</td>\n",
       "      <td>24.556320</td>\n",
       "      <td>85.39990</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>交通运输、仓储和邮政业城镇单位就业人员工资总额</th>\n",
       "      <td>2.57052</td>\n",
       "      <td>145.316662</td>\n",
       "      <td>754.81715</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>交通运输、仓储和邮政业城镇单位就业人员平均工资</th>\n",
       "      <td>25098.00000</td>\n",
       "      <td>56241.240143</td>\n",
       "      <td>116763.00000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>住宿和餐饮业城镇单位就业人员</th>\n",
       "      <td>0.30000</td>\n",
       "      <td>8.331891</td>\n",
       "      <td>39.34190</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>住宿和餐饮业城镇单位就业人员工资总额</th>\n",
       "      <td>0.75473</td>\n",
       "      <td>28.712067</td>\n",
       "      <td>172.95882</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>...</th>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>采矿业城镇单位就业人员工资总额</th>\n",
       "      <td>0.50000</td>\n",
       "      <td>101.967343</td>\n",
       "      <td>694.40506</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>采矿业城镇单位就业人员平均工资</th>\n",
       "      <td>22732.00000</td>\n",
       "      <td>56747.756272</td>\n",
       "      <td>144454.00000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>金融业城镇单位就业人员</th>\n",
       "      <td>0.77170</td>\n",
       "      <td>17.982375</td>\n",
       "      <td>54.44980</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>金融业城镇单位就业人员工资总额</th>\n",
       "      <td>5.91202</td>\n",
       "      <td>173.556902</td>\n",
       "      <td>1337.23941</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>金融业城镇单位就业人员平均工资</th>\n",
       "      <td>30627.00000</td>\n",
       "      <td>86977.516129</td>\n",
       "      <td>253637.00000</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "<p>65 rows × 3 columns</p>\n",
       "</div>"
      ],
      "text/plain": [
       "                                  数据                            \n",
       "                                 min          mean           max\n",
       "指标                                                              \n",
       "交通运输、仓储及邮电通信业城镇单位就业人员        0.59970     24.556320      85.39990\n",
       "交通运输、仓储和邮政业城镇单位就业人员工资总额      2.57052    145.316662     754.81715\n",
       "交通运输、仓储和邮政业城镇单位就业人员平均工资  25098.00000  56241.240143  116763.00000\n",
       "住宿和餐饮业城镇单位就业人员               0.30000      8.331891      39.34190\n",
       "住宿和餐饮业城镇单位就业人员工资总额           0.75473     28.712067     172.95882\n",
       "...                              ...           ...           ...\n",
       "采矿业城镇单位就业人员工资总额              0.50000    101.967343     694.40506\n",
       "采矿业城镇单位就业人员平均工资          22732.00000  56747.756272  144454.00000\n",
       "金融业城镇单位就业人员                  0.77170     17.982375      54.44980\n",
       "金融业城镇单位就业人员工资总额              5.91202    173.556902    1337.23941\n",
       "金融业城镇单位就业人员平均工资          30627.00000  86977.516129  253637.00000\n",
       "\n",
       "[65 rows x 3 columns]"
      ]
     },
     "execution_count": 82,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# groupby可以有多个索引 agg聚合被分组数据\n",
    "df_就业切片.groupby([\"指标\"]).agg({\"数据\":[\"min\",\"mean\",\"max\"]})"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### 多层次数据"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 83,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>指标</th>\n",
       "      <th>地区</th>\n",
       "      <th>年</th>\n",
       "      <th>数据</th>\n",
       "      <th>行业</th>\n",
       "      <th>行业指标</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>农林牧渔业城镇单位就业人员</td>\n",
       "      <td>北京市</td>\n",
       "      <td>2018</td>\n",
       "      <td>NaN</td>\n",
       "      <td>农林牧渔业</td>\n",
       "      <td>人员</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>农林牧渔业城镇单位就业人员</td>\n",
       "      <td>北京市</td>\n",
       "      <td>2017</td>\n",
       "      <td>3.4116</td>\n",
       "      <td>农林牧渔业</td>\n",
       "      <td>人员</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>农林牧渔业城镇单位就业人员</td>\n",
       "      <td>北京市</td>\n",
       "      <td>2016</td>\n",
       "      <td>3.6867</td>\n",
       "      <td>农林牧渔业</td>\n",
       "      <td>人员</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>农林牧渔业城镇单位就业人员</td>\n",
       "      <td>北京市</td>\n",
       "      <td>2015</td>\n",
       "      <td>3.8949</td>\n",
       "      <td>农林牧渔业</td>\n",
       "      <td>人员</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>农林牧渔业城镇单位就业人员</td>\n",
       "      <td>北京市</td>\n",
       "      <td>2014</td>\n",
       "      <td>3.2331</td>\n",
       "      <td>农林牧渔业</td>\n",
       "      <td>人员</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>...</th>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>20145</th>\n",
       "      <td>公共管理和社会组织城镇单位就业人员平均工资</td>\n",
       "      <td>新疆维吾尔自治区</td>\n",
       "      <td>2013</td>\n",
       "      <td>46636.0000</td>\n",
       "      <td>公共管理和社会组织</td>\n",
       "      <td>人员平均工资</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>20146</th>\n",
       "      <td>公共管理和社会组织城镇单位就业人员平均工资</td>\n",
       "      <td>新疆维吾尔自治区</td>\n",
       "      <td>2012</td>\n",
       "      <td>45071.0000</td>\n",
       "      <td>公共管理和社会组织</td>\n",
       "      <td>人员平均工资</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>20147</th>\n",
       "      <td>公共管理和社会组织城镇单位就业人员平均工资</td>\n",
       "      <td>新疆维吾尔自治区</td>\n",
       "      <td>2011</td>\n",
       "      <td>39862.0000</td>\n",
       "      <td>公共管理和社会组织</td>\n",
       "      <td>人员平均工资</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>20148</th>\n",
       "      <td>公共管理和社会组织城镇单位就业人员平均工资</td>\n",
       "      <td>新疆维吾尔自治区</td>\n",
       "      <td>2010</td>\n",
       "      <td>35950.0000</td>\n",
       "      <td>公共管理和社会组织</td>\n",
       "      <td>人员平均工资</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>20149</th>\n",
       "      <td>公共管理和社会组织城镇单位就业人员平均工资</td>\n",
       "      <td>新疆维吾尔自治区</td>\n",
       "      <td>2009</td>\n",
       "      <td>31217.0000</td>\n",
       "      <td>公共管理和社会组织</td>\n",
       "      <td>人员平均工资</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "<p>20150 rows × 6 columns</p>\n",
       "</div>"
      ],
      "text/plain": [
       "                          指标        地区     年          数据         行业    行业指标\n",
       "0              农林牧渔业城镇单位就业人员       北京市  2018         NaN      农林牧渔业      人员\n",
       "1              农林牧渔业城镇单位就业人员       北京市  2017      3.4116      农林牧渔业      人员\n",
       "2              农林牧渔业城镇单位就业人员       北京市  2016      3.6867      农林牧渔业      人员\n",
       "3              农林牧渔业城镇单位就业人员       北京市  2015      3.8949      农林牧渔业      人员\n",
       "4              农林牧渔业城镇单位就业人员       北京市  2014      3.2331      农林牧渔业      人员\n",
       "...                      ...       ...   ...         ...        ...     ...\n",
       "20145  公共管理和社会组织城镇单位就业人员平均工资  新疆维吾尔自治区  2013  46636.0000  公共管理和社会组织  人员平均工资\n",
       "20146  公共管理和社会组织城镇单位就业人员平均工资  新疆维吾尔自治区  2012  45071.0000  公共管理和社会组织  人员平均工资\n",
       "20147  公共管理和社会组织城镇单位就业人员平均工资  新疆维吾尔自治区  2011  39862.0000  公共管理和社会组织  人员平均工资\n",
       "20148  公共管理和社会组织城镇单位就业人员平均工资  新疆维吾尔自治区  2010  35950.0000  公共管理和社会组织  人员平均工资\n",
       "20149  公共管理和社会组织城镇单位就业人员平均工资  新疆维吾尔自治区  2009  31217.0000  公共管理和社会组织  人员平均工资\n",
       "\n",
       "[20150 rows x 6 columns]"
      ]
     },
     "execution_count": 83,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# [0]、[1]表示[0]是行业，[1]是人员\n",
    "df_就业切片['行业'] = [x.split(\"城镇单位就业\")[0] for x in df_就业切片.指标]\n",
    "df_就业切片['行业指标'] = [x.split(\"城镇单位就业\")[1] for x in df_就业切片.指标]\n",
    "df_就业切片 "
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 84,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead tr th {\n",
       "        text-align: left;\n",
       "    }\n",
       "\n",
       "    .dataframe thead tr:last-of-type th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th colspan=\"3\" halign=\"left\">数据</th>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th>min</th>\n",
       "      <th>mean</th>\n",
       "      <th>max</th>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>地区</th>\n",
       "      <th>行业</th>\n",
       "      <th>行业指标</th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th rowspan=\"5\" valign=\"top\">上海市</th>\n",
       "      <th>交通运输、仓储及邮电通信业</th>\n",
       "      <th>人员</th>\n",
       "      <td>35.63290</td>\n",
       "      <td>45.014167</td>\n",
       "      <td>51.45410</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th rowspan=\"2\" valign=\"top\">交通运输、仓储和邮政业</th>\n",
       "      <th>人员工资总额</th>\n",
       "      <td>180.79406</td>\n",
       "      <td>385.896223</td>\n",
       "      <td>600.42259</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>人员平均工资</th>\n",
       "      <td>49847.00000</td>\n",
       "      <td>81817.888889</td>\n",
       "      <td>116763.00000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th rowspan=\"2\" valign=\"top\">住宿和餐饮业</th>\n",
       "      <th>人员</th>\n",
       "      <td>10.81910</td>\n",
       "      <td>19.851000</td>\n",
       "      <td>25.54940</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>人员工资总额</th>\n",
       "      <td>31.62839</td>\n",
       "      <td>94.460543</td>\n",
       "      <td>154.30875</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>...</th>\n",
       "      <th>...</th>\n",
       "      <th>...</th>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th rowspan=\"5\" valign=\"top\">黑龙江省</th>\n",
       "      <th rowspan=\"2\" valign=\"top\">采矿业</th>\n",
       "      <th>人员工资总额</th>\n",
       "      <td>143.41895</td>\n",
       "      <td>184.938369</td>\n",
       "      <td>213.62444</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>人员平均工资</th>\n",
       "      <td>33417.00000</td>\n",
       "      <td>51564.777778</td>\n",
       "      <td>68926.00000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th rowspan=\"3\" valign=\"top\">金融业</th>\n",
       "      <th>人员</th>\n",
       "      <td>13.48210</td>\n",
       "      <td>17.099533</td>\n",
       "      <td>22.65480</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>人员工资总额</th>\n",
       "      <td>49.25370</td>\n",
       "      <td>94.806279</td>\n",
       "      <td>150.37289</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>人员平均工资</th>\n",
       "      <td>37056.00000</td>\n",
       "      <td>55194.888889</td>\n",
       "      <td>66790.00000</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "<p>2015 rows × 3 columns</p>\n",
       "</div>"
      ],
      "text/plain": [
       "                                    数据                            \n",
       "                                   min          mean           max\n",
       "地区   行业            行业指标                                           \n",
       "上海市  交通运输、仓储及邮电通信业 人员         35.63290     45.014167      51.45410\n",
       "     交通运输、仓储和邮政业   人员工资总额    180.79406    385.896223     600.42259\n",
       "                   人员平均工资  49847.00000  81817.888889  116763.00000\n",
       "     住宿和餐饮业        人员         10.81910     19.851000      25.54940\n",
       "                   人员工资总额     31.62839     94.460543     154.30875\n",
       "...                                ...           ...           ...\n",
       "黑龙江省 采矿业           人员工资总额    143.41895    184.938369     213.62444\n",
       "                   人员平均工资  33417.00000  51564.777778   68926.00000\n",
       "     金融业           人员         13.48210     17.099533      22.65480\n",
       "                   人员工资总额     49.25370     94.806279     150.37289\n",
       "                   人员平均工资  37056.00000  55194.888889   66790.00000\n",
       "\n",
       "[2015 rows x 3 columns]"
      ]
     },
     "execution_count": 84,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df_就业切片.groupby(['地区','行业','行业指标']).agg({'数据':[\"min\",'mean','max']})"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### 多层次数据分组出报表"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 94,
   "metadata": {},
   "outputs": [],
   "source": [
    "df_就业切片.to_csv(\"就业切片.tsv\",encoding = 'utf8',sep=\"\\t\")"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 95,
   "metadata": {},
   "outputs": [],
   "source": [
    "人员平均工资 = df_就业切片.query(\"行业指标=='人员平均工资'\")"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 96,
   "metadata": {
    "scrolled": true
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead tr th {\n",
       "        text-align: left;\n",
       "    }\n",
       "\n",
       "    .dataframe thead tr:last-of-type th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th colspan=\"3\" halign=\"left\">数据</th>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th>min</th>\n",
       "      <th>mean</th>\n",
       "      <th>max</th>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>行业</th>\n",
       "      <th>地区</th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th rowspan=\"4\" valign=\"top\">农、林、牧、渔业</th>\n",
       "      <th>辽宁省</th>\n",
       "      <td>8832.0</td>\n",
       "      <td>12813.111111</td>\n",
       "      <td>17027.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>河北省</th>\n",
       "      <td>11330.0</td>\n",
       "      <td>16067.333333</td>\n",
       "      <td>23327.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>黑龙江省</th>\n",
       "      <td>11079.0</td>\n",
       "      <td>21949.555556</td>\n",
       "      <td>30638.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>西藏自治区</th>\n",
       "      <td>13522.0</td>\n",
       "      <td>22214.888889</td>\n",
       "      <td>41370.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>水利、环境和公共设施管理业</th>\n",
       "      <th>山西省</th>\n",
       "      <td>15831.0</td>\n",
       "      <td>23166.111111</td>\n",
       "      <td>30961.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>...</th>\n",
       "      <th>...</th>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>金融业</th>\n",
       "      <th>西藏自治区</th>\n",
       "      <td>76650.0</td>\n",
       "      <td>133585.222222</td>\n",
       "      <td>186085.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th rowspan=\"2\" valign=\"top\">信息传输、计算机服务和软件业</th>\n",
       "      <th>北京市</th>\n",
       "      <td>100794.0</td>\n",
       "      <td>139098.888889</td>\n",
       "      <td>183183.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>上海市</th>\n",
       "      <td>101367.0</td>\n",
       "      <td>153913.666667</td>\n",
       "      <td>212063.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th rowspan=\"2\" valign=\"top\">金融业</th>\n",
       "      <th>上海市</th>\n",
       "      <td>134581.0</td>\n",
       "      <td>188385.000000</td>\n",
       "      <td>247568.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>北京市</th>\n",
       "      <td>143187.0</td>\n",
       "      <td>204188.555556</td>\n",
       "      <td>253637.0</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "<p>589 rows × 3 columns</p>\n",
       "</div>"
      ],
      "text/plain": [
       "                            数据                         \n",
       "                           min           mean       max\n",
       "行业             地区                                      \n",
       "农、林、牧、渔业       辽宁省      8832.0   12813.111111   17027.0\n",
       "               河北省     11330.0   16067.333333   23327.0\n",
       "               黑龙江省    11079.0   21949.555556   30638.0\n",
       "               西藏自治区   13522.0   22214.888889   41370.0\n",
       "水利、环境和公共设施管理业  山西省     15831.0   23166.111111   30961.0\n",
       "...                        ...            ...       ...\n",
       "金融业            西藏自治区   76650.0  133585.222222  186085.0\n",
       "信息传输、计算机服务和软件业 北京市    100794.0  139098.888889  183183.0\n",
       "               上海市    101367.0  153913.666667  212063.0\n",
       "金融业            上海市    134581.0  188385.000000  247568.0\n",
       "               北京市    143187.0  204188.555556  253637.0\n",
       "\n",
       "[589 rows x 3 columns]"
      ]
     },
     "execution_count": 96,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "人员平均工资.groupby(['行业','地区']).agg({'数据':['min','mean','max']}).sort_values(by=('数据','mean'))"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 106,
   "metadata": {
    "scrolled": true
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead tr th {\n",
       "        text-align: left;\n",
       "    }\n",
       "\n",
       "    .dataframe thead tr:last-of-type th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr>\n",
       "      <th></th>\n",
       "      <th colspan=\"3\" halign=\"left\">数据</th>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th></th>\n",
       "      <th>min</th>\n",
       "      <th>mean</th>\n",
       "      <th>max</th>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>地区</th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>上海市</th>\n",
       "      <td>29564.0</td>\n",
       "      <td>95373.456140</td>\n",
       "      <td>247568.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>北京市</th>\n",
       "      <td>25006.0</td>\n",
       "      <td>89086.046784</td>\n",
       "      <td>253637.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>天津市</th>\n",
       "      <td>20992.0</td>\n",
       "      <td>73773.017544</td>\n",
       "      <td>151778.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>浙江省</th>\n",
       "      <td>22456.0</td>\n",
       "      <td>66680.111111</td>\n",
       "      <td>165532.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>广东省</th>\n",
       "      <td>14469.0</td>\n",
       "      <td>63142.736842</td>\n",
       "      <td>149936.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>江苏省</th>\n",
       "      <td>17904.0</td>\n",
       "      <td>61104.783626</td>\n",
       "      <td>143002.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>西藏自治区</th>\n",
       "      <td>13522.0</td>\n",
       "      <td>60094.643275</td>\n",
       "      <td>186085.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>福建省</th>\n",
       "      <td>15790.0</td>\n",
       "      <td>52346.286550</td>\n",
       "      <td>109757.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>重庆市</th>\n",
       "      <td>17129.0</td>\n",
       "      <td>52280.444444</td>\n",
       "      <td>126739.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>山东省</th>\n",
       "      <td>19568.0</td>\n",
       "      <td>50366.672515</td>\n",
       "      <td>94704.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>新疆维吾尔自治区</th>\n",
       "      <td>16022.0</td>\n",
       "      <td>50234.625731</td>\n",
       "      <td>105881.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>四川省</th>\n",
       "      <td>17748.0</td>\n",
       "      <td>49618.280702</td>\n",
       "      <td>101514.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>青海省</th>\n",
       "      <td>16825.0</td>\n",
       "      <td>49264.678363</td>\n",
       "      <td>100823.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>宁夏回族自治区</th>\n",
       "      <td>15529.0</td>\n",
       "      <td>49129.701754</td>\n",
       "      <td>103768.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>内蒙古自治区</th>\n",
       "      <td>15017.0</td>\n",
       "      <td>47498.690058</td>\n",
       "      <td>85135.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>贵州省</th>\n",
       "      <td>16895.0</td>\n",
       "      <td>47309.122807</td>\n",
       "      <td>141959.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>海南省</th>\n",
       "      <td>10855.0</td>\n",
       "      <td>47224.847953</td>\n",
       "      <td>124017.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>陕西省</th>\n",
       "      <td>16338.0</td>\n",
       "      <td>46612.181287</td>\n",
       "      <td>130891.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>安徽省</th>\n",
       "      <td>13437.0</td>\n",
       "      <td>45770.783626</td>\n",
       "      <td>98235.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>湖北省</th>\n",
       "      <td>15777.0</td>\n",
       "      <td>45400.081871</td>\n",
       "      <td>101551.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>辽宁省</th>\n",
       "      <td>8832.0</td>\n",
       "      <td>45122.994152</td>\n",
       "      <td>91990.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>云南省</th>\n",
       "      <td>14853.0</td>\n",
       "      <td>44699.356725</td>\n",
       "      <td>130774.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>湖南省</th>\n",
       "      <td>14519.0</td>\n",
       "      <td>43279.467836</td>\n",
       "      <td>99320.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>广西壮族自治区</th>\n",
       "      <td>15397.0</td>\n",
       "      <td>43223.590643</td>\n",
       "      <td>96818.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>河北省</th>\n",
       "      <td>11330.0</td>\n",
       "      <td>42770.233918</td>\n",
       "      <td>109196.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>黑龙江省</th>\n",
       "      <td>11079.0</td>\n",
       "      <td>42505.538012</td>\n",
       "      <td>73978.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>江西省</th>\n",
       "      <td>15049.0</td>\n",
       "      <td>42360.959064</td>\n",
       "      <td>84304.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>甘肃省</th>\n",
       "      <td>15163.0</td>\n",
       "      <td>40974.327485</td>\n",
       "      <td>85197.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>河南省</th>\n",
       "      <td>15718.0</td>\n",
       "      <td>40797.461988</td>\n",
       "      <td>103314.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>吉林省</th>\n",
       "      <td>13636.0</td>\n",
       "      <td>40642.450292</td>\n",
       "      <td>87154.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>山西省</th>\n",
       "      <td>13455.0</td>\n",
       "      <td>40518.602339</td>\n",
       "      <td>80556.0</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "               数据                        \n",
       "              min          mean       max\n",
       "地区                                       \n",
       "上海市       29564.0  95373.456140  247568.0\n",
       "北京市       25006.0  89086.046784  253637.0\n",
       "天津市       20992.0  73773.017544  151778.0\n",
       "浙江省       22456.0  66680.111111  165532.0\n",
       "广东省       14469.0  63142.736842  149936.0\n",
       "江苏省       17904.0  61104.783626  143002.0\n",
       "西藏自治区     13522.0  60094.643275  186085.0\n",
       "福建省       15790.0  52346.286550  109757.0\n",
       "重庆市       17129.0  52280.444444  126739.0\n",
       "山东省       19568.0  50366.672515   94704.0\n",
       "新疆维吾尔自治区  16022.0  50234.625731  105881.0\n",
       "四川省       17748.0  49618.280702  101514.0\n",
       "青海省       16825.0  49264.678363  100823.0\n",
       "宁夏回族自治区   15529.0  49129.701754  103768.0\n",
       "内蒙古自治区    15017.0  47498.690058   85135.0\n",
       "贵州省       16895.0  47309.122807  141959.0\n",
       "海南省       10855.0  47224.847953  124017.0\n",
       "陕西省       16338.0  46612.181287  130891.0\n",
       "安徽省       13437.0  45770.783626   98235.0\n",
       "湖北省       15777.0  45400.081871  101551.0\n",
       "辽宁省        8832.0  45122.994152   91990.0\n",
       "云南省       14853.0  44699.356725  130774.0\n",
       "湖南省       14519.0  43279.467836   99320.0\n",
       "广西壮族自治区   15397.0  43223.590643   96818.0\n",
       "河北省       11330.0  42770.233918  109196.0\n",
       "黑龙江省      11079.0  42505.538012   73978.0\n",
       "江西省       15049.0  42360.959064   84304.0\n",
       "甘肃省       15163.0  40974.327485   85197.0\n",
       "河南省       15718.0  40797.461988  103314.0\n",
       "吉林省       13636.0  40642.450292   87154.0\n",
       "山西省       13455.0  40518.602339   80556.0"
      ]
     },
     "execution_count": 106,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "人员平均工资.groupby(['地区']).agg({\"数据\":[\"min\",\"mean\",\"max\"]}).sort_values(by=('数据','mean'),ascending=False)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 107,
   "metadata": {
    "scrolled": true
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>指标</th>\n",
       "      <th>地区</th>\n",
       "      <th>年</th>\n",
       "      <th>数据</th>\n",
       "      <th>行业</th>\n",
       "      <th>行业指标</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>14260</th>\n",
       "      <td>农、林、牧、渔业城镇单位就业人员平均工资</td>\n",
       "      <td>北京市</td>\n",
       "      <td>2018</td>\n",
       "      <td>NaN</td>\n",
       "      <td>农、林、牧、渔业</td>\n",
       "      <td>人员平均工资</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>14261</th>\n",
       "      <td>农、林、牧、渔业城镇单位就业人员平均工资</td>\n",
       "      <td>北京市</td>\n",
       "      <td>2017</td>\n",
       "      <td>55218.0</td>\n",
       "      <td>农、林、牧、渔业</td>\n",
       "      <td>人员平均工资</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>14262</th>\n",
       "      <td>农、林、牧、渔业城镇单位就业人员平均工资</td>\n",
       "      <td>北京市</td>\n",
       "      <td>2016</td>\n",
       "      <td>51941.0</td>\n",
       "      <td>农、林、牧、渔业</td>\n",
       "      <td>人员平均工资</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>14263</th>\n",
       "      <td>农、林、牧、渔业城镇单位就业人员平均工资</td>\n",
       "      <td>北京市</td>\n",
       "      <td>2015</td>\n",
       "      <td>50797.0</td>\n",
       "      <td>农、林、牧、渔业</td>\n",
       "      <td>人员平均工资</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>14264</th>\n",
       "      <td>农、林、牧、渔业城镇单位就业人员平均工资</td>\n",
       "      <td>北京市</td>\n",
       "      <td>2014</td>\n",
       "      <td>49478.0</td>\n",
       "      <td>农、林、牧、渔业</td>\n",
       "      <td>人员平均工资</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>...</th>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>20145</th>\n",
       "      <td>公共管理和社会组织城镇单位就业人员平均工资</td>\n",
       "      <td>新疆维吾尔自治区</td>\n",
       "      <td>2013</td>\n",
       "      <td>46636.0</td>\n",
       "      <td>公共管理和社会组织</td>\n",
       "      <td>人员平均工资</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>20146</th>\n",
       "      <td>公共管理和社会组织城镇单位就业人员平均工资</td>\n",
       "      <td>新疆维吾尔自治区</td>\n",
       "      <td>2012</td>\n",
       "      <td>45071.0</td>\n",
       "      <td>公共管理和社会组织</td>\n",
       "      <td>人员平均工资</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>20147</th>\n",
       "      <td>公共管理和社会组织城镇单位就业人员平均工资</td>\n",
       "      <td>新疆维吾尔自治区</td>\n",
       "      <td>2011</td>\n",
       "      <td>39862.0</td>\n",
       "      <td>公共管理和社会组织</td>\n",
       "      <td>人员平均工资</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>20148</th>\n",
       "      <td>公共管理和社会组织城镇单位就业人员平均工资</td>\n",
       "      <td>新疆维吾尔自治区</td>\n",
       "      <td>2010</td>\n",
       "      <td>35950.0</td>\n",
       "      <td>公共管理和社会组织</td>\n",
       "      <td>人员平均工资</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>20149</th>\n",
       "      <td>公共管理和社会组织城镇单位就业人员平均工资</td>\n",
       "      <td>新疆维吾尔自治区</td>\n",
       "      <td>2009</td>\n",
       "      <td>31217.0</td>\n",
       "      <td>公共管理和社会组织</td>\n",
       "      <td>人员平均工资</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "<p>5890 rows × 6 columns</p>\n",
       "</div>"
      ],
      "text/plain": [
       "                          指标        地区     年       数据         行业    行业指标\n",
       "14260   农、林、牧、渔业城镇单位就业人员平均工资       北京市  2018      NaN   农、林、牧、渔业  人员平均工资\n",
       "14261   农、林、牧、渔业城镇单位就业人员平均工资       北京市  2017  55218.0   农、林、牧、渔业  人员平均工资\n",
       "14262   农、林、牧、渔业城镇单位就业人员平均工资       北京市  2016  51941.0   农、林、牧、渔业  人员平均工资\n",
       "14263   农、林、牧、渔业城镇单位就业人员平均工资       北京市  2015  50797.0   农、林、牧、渔业  人员平均工资\n",
       "14264   农、林、牧、渔业城镇单位就业人员平均工资       北京市  2014  49478.0   农、林、牧、渔业  人员平均工资\n",
       "...                      ...       ...   ...      ...        ...     ...\n",
       "20145  公共管理和社会组织城镇单位就业人员平均工资  新疆维吾尔自治区  2013  46636.0  公共管理和社会组织  人员平均工资\n",
       "20146  公共管理和社会组织城镇单位就业人员平均工资  新疆维吾尔自治区  2012  45071.0  公共管理和社会组织  人员平均工资\n",
       "20147  公共管理和社会组织城镇单位就业人员平均工资  新疆维吾尔自治区  2011  39862.0  公共管理和社会组织  人员平均工资\n",
       "20148  公共管理和社会组织城镇单位就业人员平均工资  新疆维吾尔自治区  2010  35950.0  公共管理和社会组织  人员平均工资\n",
       "20149  公共管理和社会组织城镇单位就业人员平均工资  新疆维吾尔自治区  2009  31217.0  公共管理和社会组织  人员平均工资\n",
       "\n",
       "[5890 rows x 6 columns]"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead tr th {\n",
       "        text-align: left;\n",
       "    }\n",
       "\n",
       "    .dataframe thead tr:last-of-type th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr>\n",
       "      <th></th>\n",
       "      <th colspan=\"3\" halign=\"left\">数据</th>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th></th>\n",
       "      <th>min</th>\n",
       "      <th>mean</th>\n",
       "      <th>max</th>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>行业</th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>交通运输、仓储和邮政业</th>\n",
       "      <td>25098.0</td>\n",
       "      <td>56241.240143</td>\n",
       "      <td>116763.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>住宿和餐饮业</th>\n",
       "      <td>13455.0</td>\n",
       "      <td>31198.731183</td>\n",
       "      <td>61095.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>信息传输、计算机服务和软件业</th>\n",
       "      <td>22186.0</td>\n",
       "      <td>72507.896057</td>\n",
       "      <td>212063.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>公共管理和社会组织</th>\n",
       "      <td>25275.0</td>\n",
       "      <td>55019.594982</td>\n",
       "      <td>128855.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>农、林、牧、渔业</th>\n",
       "      <td>8832.0</td>\n",
       "      <td>30661.906810</td>\n",
       "      <td>74975.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>制造业</th>\n",
       "      <td>21508.0</td>\n",
       "      <td>45198.247312</td>\n",
       "      <td>106835.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>卫生、社会保障和社会福利业</th>\n",
       "      <td>22302.0</td>\n",
       "      <td>59073.053763</td>\n",
       "      <td>169191.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>居民服务和其他服务业</th>\n",
       "      <td>16022.0</td>\n",
       "      <td>35929.476703</td>\n",
       "      <td>67013.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>建筑业</th>\n",
       "      <td>16423.0</td>\n",
       "      <td>40809.896057</td>\n",
       "      <td>99718.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>房地产业</th>\n",
       "      <td>15938.0</td>\n",
       "      <td>45288.530466</td>\n",
       "      <td>120379.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>批发和零售业</th>\n",
       "      <td>16073.0</td>\n",
       "      <td>44120.035842</td>\n",
       "      <td>139627.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>教育</th>\n",
       "      <td>26175.0</td>\n",
       "      <td>57414.487455</td>\n",
       "      <td>143215.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>文化、体育和娱乐业</th>\n",
       "      <td>22377.0</td>\n",
       "      <td>54176.698925</td>\n",
       "      <td>150810.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>水利、环境和公共设施管理业</th>\n",
       "      <td>15831.0</td>\n",
       "      <td>36995.433692</td>\n",
       "      <td>95341.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>电力、燃气及水的生产和供应业</th>\n",
       "      <td>29419.0</td>\n",
       "      <td>67744.182796</td>\n",
       "      <td>174252.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>科学研究、技术服务和地质勘查业</th>\n",
       "      <td>26211.0</td>\n",
       "      <td>66216.186380</td>\n",
       "      <td>176383.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>租赁和商务服务业</th>\n",
       "      <td>16691.0</td>\n",
       "      <td>43966.784946</td>\n",
       "      <td>156621.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>采矿业</th>\n",
       "      <td>22732.0</td>\n",
       "      <td>56747.756272</td>\n",
       "      <td>144454.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>金融业</th>\n",
       "      <td>30627.0</td>\n",
       "      <td>86977.516129</td>\n",
       "      <td>253637.0</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "                      数据                        \n",
       "                     min          mean       max\n",
       "行业                                              \n",
       "交通运输、仓储和邮政业      25098.0  56241.240143  116763.0\n",
       "住宿和餐饮业           13455.0  31198.731183   61095.0\n",
       "信息传输、计算机服务和软件业   22186.0  72507.896057  212063.0\n",
       "公共管理和社会组织        25275.0  55019.594982  128855.0\n",
       "农、林、牧、渔业          8832.0  30661.906810   74975.0\n",
       "制造业              21508.0  45198.247312  106835.0\n",
       "卫生、社会保障和社会福利业    22302.0  59073.053763  169191.0\n",
       "居民服务和其他服务业       16022.0  35929.476703   67013.0\n",
       "建筑业              16423.0  40809.896057   99718.0\n",
       "房地产业             15938.0  45288.530466  120379.0\n",
       "批发和零售业           16073.0  44120.035842  139627.0\n",
       "教育               26175.0  57414.487455  143215.0\n",
       "文化、体育和娱乐业        22377.0  54176.698925  150810.0\n",
       "水利、环境和公共设施管理业    15831.0  36995.433692   95341.0\n",
       "电力、燃气及水的生产和供应业   29419.0  67744.182796  174252.0\n",
       "科学研究、技术服务和地质勘查业  26211.0  66216.186380  176383.0\n",
       "租赁和商务服务业         16691.0  43966.784946  156621.0\n",
       "采矿业              22732.0  56747.756272  144454.0\n",
       "金融业              30627.0  86977.516129  253637.0"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "MultiIndex([('数据',  'min'),\n",
      "            ('数据', 'mean'),\n",
      "            ('数据',  'max')],\n",
      "           )\n"
     ]
    }
   ],
   "source": [
    "_df_ = 人员平均工资.groupby(['行业']).agg({\"数据\":[\"min\",\"mean\",\"max\"]})\n",
    "display(人员平均工资)\n",
    "display(_df_)\n",
    "print(_df_.columns)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 108,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "MultiIndex([('数据',  'min'),\n",
       "            ('数据', 'mean'),\n",
       "            ('数据',  'max')],\n",
       "           )"
      ]
     },
     "execution_count": 108,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "人员平均工资.groupby(['行业']).agg({\"数据\":[\"min\",\"mean\",\"max\"]}).columns"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 111,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead tr th {\n",
       "        text-align: left;\n",
       "    }\n",
       "\n",
       "    .dataframe thead tr:last-of-type th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th colspan=\"3\" halign=\"left\">数据</th>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th>min</th>\n",
       "      <th>mean</th>\n",
       "      <th>max</th>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>地区</th>\n",
       "      <th>行业</th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>北京市</th>\n",
       "      <th>金融业</th>\n",
       "      <td>143187.0</td>\n",
       "      <td>204188.555556</td>\n",
       "      <td>253637.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th rowspan=\"2\" valign=\"top\">上海市</th>\n",
       "      <th>金融业</th>\n",
       "      <td>134581.0</td>\n",
       "      <td>188385.000000</td>\n",
       "      <td>247568.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>信息传输、计算机服务和软件业</th>\n",
       "      <td>101367.0</td>\n",
       "      <td>153913.666667</td>\n",
       "      <td>212063.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>北京市</th>\n",
       "      <th>信息传输、计算机服务和软件业</th>\n",
       "      <td>100794.0</td>\n",
       "      <td>139098.888889</td>\n",
       "      <td>183183.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>西藏自治区</th>\n",
       "      <th>金融业</th>\n",
       "      <td>76650.0</td>\n",
       "      <td>133585.222222</td>\n",
       "      <td>186085.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th rowspan=\"2\" valign=\"top\">上海市</th>\n",
       "      <th>科学研究、技术服务和地质勘查业</th>\n",
       "      <td>76108.0</td>\n",
       "      <td>133555.111111</td>\n",
       "      <td>176383.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>电力、燃气及水的生产和供应业</th>\n",
       "      <td>83958.0</td>\n",
       "      <td>127959.666667</td>\n",
       "      <td>174252.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>浙江省</th>\n",
       "      <th>金融业</th>\n",
       "      <td>84714.0</td>\n",
       "      <td>117956.000000</td>\n",
       "      <td>132411.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>广东省</th>\n",
       "      <th>金融业</th>\n",
       "      <td>84721.0</td>\n",
       "      <td>115820.555556</td>\n",
       "      <td>149936.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th rowspan=\"3\" valign=\"top\">北京市</th>\n",
       "      <th>科学研究、技术服务和地质勘查业</th>\n",
       "      <td>77632.0</td>\n",
       "      <td>114464.555556</td>\n",
       "      <td>150611.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>卫生、社会保障和社会福利业</th>\n",
       "      <td>63081.0</td>\n",
       "      <td>111614.888889</td>\n",
       "      <td>169191.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>文化、体育和娱乐业</th>\n",
       "      <td>67881.0</td>\n",
       "      <td>110725.555556</td>\n",
       "      <td>150810.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>上海市</th>\n",
       "      <th>租赁和商务服务业</th>\n",
       "      <td>53146.0</td>\n",
       "      <td>110228.333333</td>\n",
       "      <td>156621.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>浙江省</th>\n",
       "      <th>信息传输、计算机服务和软件业</th>\n",
       "      <td>71664.0</td>\n",
       "      <td>109814.666667</td>\n",
       "      <td>165532.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>北京市</th>\n",
       "      <th>电力、燃气及水的生产和供应业</th>\n",
       "      <td>77875.0</td>\n",
       "      <td>106858.333333</td>\n",
       "      <td>148142.0</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "                             数据                         \n",
       "                            min           mean       max\n",
       "地区    行业                                                \n",
       "北京市   金融业              143187.0  204188.555556  253637.0\n",
       "上海市   金融业              134581.0  188385.000000  247568.0\n",
       "      信息传输、计算机服务和软件业   101367.0  153913.666667  212063.0\n",
       "北京市   信息传输、计算机服务和软件业   100794.0  139098.888889  183183.0\n",
       "西藏自治区 金融业               76650.0  133585.222222  186085.0\n",
       "上海市   科学研究、技术服务和地质勘查业   76108.0  133555.111111  176383.0\n",
       "      电力、燃气及水的生产和供应业    83958.0  127959.666667  174252.0\n",
       "浙江省   金融业               84714.0  117956.000000  132411.0\n",
       "广东省   金融业               84721.0  115820.555556  149936.0\n",
       "北京市   科学研究、技术服务和地质勘查业   77632.0  114464.555556  150611.0\n",
       "      卫生、社会保障和社会福利业     63081.0  111614.888889  169191.0\n",
       "      文化、体育和娱乐业         67881.0  110725.555556  150810.0\n",
       "上海市   租赁和商务服务业          53146.0  110228.333333  156621.0\n",
       "浙江省   信息传输、计算机服务和软件业    71664.0  109814.666667  165532.0\n",
       "北京市   电力、燃气及水的生产和供应业    77875.0  106858.333333  148142.0"
      ]
     },
     "execution_count": 111,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "人员平均工资.groupby(['地区','行业']).agg({\"数据\":[\"min\",\"mean\",\"max\"]}).sort_values(by=('数据','mean'),ascending=False).head(15)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 118,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array(['农林牧渔业', '采矿业', '制造业', '电力、燃气及水的生产和供应业', '建筑业', '交通运输`仓储和邮政业',\n",
       "       '信息传输、计算机服务和软件业', '批发和零售业', '住宿和餐饮业', '金融业', '房地产业', '租赁和商务服务业',\n",
       "       '科学研究、技术服务和地质勘查业', '水利、环境和公共设施管理业', '居民服务和其他服务业', '教育业',\n",
       "       '卫生、社会保障和社会福利业', '文化、体育和娱乐业', '公共管理和社会组织', '国有', '其他'],\n",
       "      dtype=object)"
      ]
     },
     "execution_count": 118,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# 多层次数据分组出报表 将行业拆分\n",
    "统一字词 = {\"交通运输、仓储及邮电通信业\":\"交通运输`仓储和邮政业\",\\\n",
    "            \"交通运输、仓储和邮政业\":\"交通运输`仓储和邮政业\",\\\n",
    "             \"农、林、牧、渔业\":\"农林牧渔业\",\\\n",
    "             \"教育\":\"教育业\",\"教育业\":\"教育业\"}\n",
    "df_就业切片_新 = df_就业切片.set_index('行业').rename(index=统一字词).reset_index()\n",
    "df_就业切片_新.行业.unique()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 120,
   "metadata": {
    "scrolled": true
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead tr th {\n",
       "        text-align: left;\n",
       "    }\n",
       "\n",
       "    .dataframe thead tr:last-of-type th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th colspan=\"3\" halign=\"left\">数据</th>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th>min</th>\n",
       "      <th>mean</th>\n",
       "      <th>max</th>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>行业</th>\n",
       "      <th>行业指标</th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th rowspan=\"3\" valign=\"top\">交通运输`仓储和邮政业</th>\n",
       "      <th>人员</th>\n",
       "      <td>0.59970</td>\n",
       "      <td>24.556320</td>\n",
       "      <td>85.39990</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>人员工资总额</th>\n",
       "      <td>2.57052</td>\n",
       "      <td>145.316662</td>\n",
       "      <td>754.81715</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>人员平均工资</th>\n",
       "      <td>25098.00000</td>\n",
       "      <td>56241.240143</td>\n",
       "      <td>116763.00000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th rowspan=\"2\" valign=\"top\">住宿和餐饮业</th>\n",
       "      <th>人员</th>\n",
       "      <td>0.30000</td>\n",
       "      <td>8.331891</td>\n",
       "      <td>39.34190</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>人员工资总额</th>\n",
       "      <td>0.75473</td>\n",
       "      <td>28.712067</td>\n",
       "      <td>172.95882</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>...</th>\n",
       "      <th>...</th>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th rowspan=\"2\" valign=\"top\">采矿业</th>\n",
       "      <th>人员工资总额</th>\n",
       "      <td>0.50000</td>\n",
       "      <td>101.967343</td>\n",
       "      <td>694.40506</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>人员平均工资</th>\n",
       "      <td>22732.00000</td>\n",
       "      <td>56747.756272</td>\n",
       "      <td>144454.00000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th rowspan=\"3\" valign=\"top\">金融业</th>\n",
       "      <th>人员</th>\n",
       "      <td>0.77170</td>\n",
       "      <td>17.982375</td>\n",
       "      <td>54.44980</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>人员工资总额</th>\n",
       "      <td>5.91202</td>\n",
       "      <td>173.556902</td>\n",
       "      <td>1337.23941</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>人员平均工资</th>\n",
       "      <td>30627.00000</td>\n",
       "      <td>86977.516129</td>\n",
       "      <td>253637.00000</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "<p>65 rows × 3 columns</p>\n",
       "</div>"
      ],
      "text/plain": [
       "                             数据                            \n",
       "                            min          mean           max\n",
       "行业          行业指标                                           \n",
       "交通运输`仓储和邮政业 人员          0.59970     24.556320      85.39990\n",
       "            人员工资总额      2.57052    145.316662     754.81715\n",
       "            人员平均工资  25098.00000  56241.240143  116763.00000\n",
       "住宿和餐饮业      人员          0.30000      8.331891      39.34190\n",
       "            人员工资总额      0.75473     28.712067     172.95882\n",
       "...                         ...           ...           ...\n",
       "采矿业         人员工资总额      0.50000    101.967343     694.40506\n",
       "            人员平均工资  22732.00000  56747.756272  144454.00000\n",
       "金融业         人员          0.77170     17.982375      54.44980\n",
       "            人员工资总额      5.91202    173.556902    1337.23941\n",
       "            人员平均工资  30627.00000  86977.516129  253637.00000\n",
       "\n",
       "[65 rows x 3 columns]"
      ]
     },
     "execution_count": 120,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df_就业切片_新.groupby(['行业','行业指标']).agg({\"数据\":[\"min\",\"mean\",\"max\"]})"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 121,
   "metadata": {
    "scrolled": true
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th>行业指标</th>\n",
       "      <th>人员</th>\n",
       "      <th>人员工资总额</th>\n",
       "      <th>人员工资总额指数(上年=100)</th>\n",
       "      <th>人员平均实际工资指数(上年=100)</th>\n",
       "      <th>人员平均工资</th>\n",
       "      <th>人员平均货币工资指数(上年=100)</th>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>行业</th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>金融业</th>\n",
       "      <td>17.982375</td>\n",
       "      <td>173.556902</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>86977.516129</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>信息传输、计算机服务和软件业</th>\n",
       "      <td>9.204604</td>\n",
       "      <td>90.642718</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>72507.896057</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>电力、燃气及水的生产和供应业</th>\n",
       "      <td>11.707497</td>\n",
       "      <td>78.738557</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>67744.182796</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>科学研究、技术服务和地质勘查业</th>\n",
       "      <td>11.614666</td>\n",
       "      <td>91.696553</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>66216.186380</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>卫生、社会保障和社会福利业</th>\n",
       "      <td>24.421601</td>\n",
       "      <td>148.932059</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>59073.053763</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>教育业</th>\n",
       "      <td>53.813387</td>\n",
       "      <td>298.610077</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>57414.487455</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>采矿业</th>\n",
       "      <td>18.220504</td>\n",
       "      <td>101.967343</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>56747.756272</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>交通运输`仓储和邮政业</th>\n",
       "      <td>24.556320</td>\n",
       "      <td>145.316662</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>56241.240143</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>公共管理和社会组织</th>\n",
       "      <td>50.301842</td>\n",
       "      <td>269.920498</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>55019.594982</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>文化、体育和娱乐业</th>\n",
       "      <td>4.581411</td>\n",
       "      <td>28.117130</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>54176.698925</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>房地产业</th>\n",
       "      <td>10.849628</td>\n",
       "      <td>57.828038</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>45288.530466</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>制造业</th>\n",
       "      <td>145.443355</td>\n",
       "      <td>687.783178</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>45198.247312</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>批发和零售业</th>\n",
       "      <td>24.356891</td>\n",
       "      <td>127.337490</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>44120.035842</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>租赁和商务服务业</th>\n",
       "      <td>12.672472</td>\n",
       "      <td>78.751265</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>43966.784946</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>建筑业</th>\n",
       "      <td>72.355329</td>\n",
       "      <td>311.381129</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>40809.896057</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>水利、环境和公共设施管理业</th>\n",
       "      <td>8.022701</td>\n",
       "      <td>29.778214</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>36995.433692</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>居民服务和其他服务业</th>\n",
       "      <td>2.277055</td>\n",
       "      <td>8.679952</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>35929.476703</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>住宿和餐饮业</th>\n",
       "      <td>8.331891</td>\n",
       "      <td>28.712067</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>31198.731183</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>农林牧渔业</th>\n",
       "      <td>10.091744</td>\n",
       "      <td>24.675831</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>30661.906810</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>其他</th>\n",
       "      <td>NaN</td>\n",
       "      <td>1601.319454</td>\n",
       "      <td>124.876834</td>\n",
       "      <td>108.797105</td>\n",
       "      <td>NaN</td>\n",
       "      <td>111.329688</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>国有</th>\n",
       "      <td>NaN</td>\n",
       "      <td>1117.760419</td>\n",
       "      <td>111.296225</td>\n",
       "      <td>109.312366</td>\n",
       "      <td>NaN</td>\n",
       "      <td>111.829440</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "行业指标                     人员       人员工资总额  人员工资总额指数(上年=100)  \\\n",
       "行业                                                           \n",
       "金融业               17.982375   173.556902               NaN   \n",
       "信息传输、计算机服务和软件业     9.204604    90.642718               NaN   \n",
       "电力、燃气及水的生产和供应业    11.707497    78.738557               NaN   \n",
       "科学研究、技术服务和地质勘查业   11.614666    91.696553               NaN   \n",
       "卫生、社会保障和社会福利业     24.421601   148.932059               NaN   \n",
       "教育业               53.813387   298.610077               NaN   \n",
       "采矿业               18.220504   101.967343               NaN   \n",
       "交通运输`仓储和邮政业       24.556320   145.316662               NaN   \n",
       "公共管理和社会组织         50.301842   269.920498               NaN   \n",
       "文化、体育和娱乐业          4.581411    28.117130               NaN   \n",
       "房地产业              10.849628    57.828038               NaN   \n",
       "制造业              145.443355   687.783178               NaN   \n",
       "批发和零售业            24.356891   127.337490               NaN   \n",
       "租赁和商务服务业          12.672472    78.751265               NaN   \n",
       "建筑业               72.355329   311.381129               NaN   \n",
       "水利、环境和公共设施管理业      8.022701    29.778214               NaN   \n",
       "居民服务和其他服务业         2.277055     8.679952               NaN   \n",
       "住宿和餐饮业             8.331891    28.712067               NaN   \n",
       "农林牧渔业             10.091744    24.675831               NaN   \n",
       "其他                      NaN  1601.319454        124.876834   \n",
       "国有                      NaN  1117.760419        111.296225   \n",
       "\n",
       "行业指标             人员平均实际工资指数(上年=100)        人员平均工资  人员平均货币工资指数(上年=100)  \n",
       "行业                                                                     \n",
       "金融业                             NaN  86977.516129                 NaN  \n",
       "信息传输、计算机服务和软件业                  NaN  72507.896057                 NaN  \n",
       "电力、燃气及水的生产和供应业                  NaN  67744.182796                 NaN  \n",
       "科学研究、技术服务和地质勘查业                 NaN  66216.186380                 NaN  \n",
       "卫生、社会保障和社会福利业                   NaN  59073.053763                 NaN  \n",
       "教育业                             NaN  57414.487455                 NaN  \n",
       "采矿业                             NaN  56747.756272                 NaN  \n",
       "交通运输`仓储和邮政业                     NaN  56241.240143                 NaN  \n",
       "公共管理和社会组织                       NaN  55019.594982                 NaN  \n",
       "文化、体育和娱乐业                       NaN  54176.698925                 NaN  \n",
       "房地产业                            NaN  45288.530466                 NaN  \n",
       "制造业                             NaN  45198.247312                 NaN  \n",
       "批发和零售业                          NaN  44120.035842                 NaN  \n",
       "租赁和商务服务业                        NaN  43966.784946                 NaN  \n",
       "建筑业                             NaN  40809.896057                 NaN  \n",
       "水利、环境和公共设施管理业                   NaN  36995.433692                 NaN  \n",
       "居民服务和其他服务业                      NaN  35929.476703                 NaN  \n",
       "住宿和餐饮业                          NaN  31198.731183                 NaN  \n",
       "农林牧渔业                           NaN  30661.906810                 NaN  \n",
       "其他                       108.797105           NaN          111.329688  \n",
       "国有                       109.312366           NaN          111.829440  "
      ]
     },
     "execution_count": 121,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df_就业切片_新.pivot_table(index='行业',columns='行业指标',values='数据').sort_values('人员平均工资',ascending=False)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 122,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th>行业指标</th>\n",
       "      <th>人员</th>\n",
       "      <th>人员工资总额</th>\n",
       "      <th>人员工资总额指数(上年=100)</th>\n",
       "      <th>人员平均实际工资指数(上年=100)</th>\n",
       "      <th>人员平均工资</th>\n",
       "      <th>人员平均货币工资指数(上年=100)</th>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>地区</th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>上海市</th>\n",
       "      <td>29.217498</td>\n",
       "      <td>506.729873</td>\n",
       "      <td>114.167000</td>\n",
       "      <td>107.737437</td>\n",
       "      <td>95373.456140</td>\n",
       "      <td>110.225491</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>北京市</th>\n",
       "      <td>38.299189</td>\n",
       "      <td>653.921263</td>\n",
       "      <td>113.519823</td>\n",
       "      <td>108.038843</td>\n",
       "      <td>89086.046784</td>\n",
       "      <td>110.378292</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>天津市</th>\n",
       "      <td>14.110606</td>\n",
       "      <td>176.701914</td>\n",
       "      <td>113.903208</td>\n",
       "      <td>108.390809</td>\n",
       "      <td>73773.017544</td>\n",
       "      <td>110.858152</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>浙江省</th>\n",
       "      <td>53.427877</td>\n",
       "      <td>544.868658</td>\n",
       "      <td>114.136936</td>\n",
       "      <td>108.235843</td>\n",
       "      <td>66680.111111</td>\n",
       "      <td>110.637751</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>广东省</th>\n",
       "      <td>84.940409</td>\n",
       "      <td>892.916516</td>\n",
       "      <td>118.186271</td>\n",
       "      <td>108.310723</td>\n",
       "      <td>63142.736842</td>\n",
       "      <td>110.540402</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>江苏省</th>\n",
       "      <td>62.964261</td>\n",
       "      <td>665.158229</td>\n",
       "      <td>121.719647</td>\n",
       "      <td>109.055147</td>\n",
       "      <td>61104.783626</td>\n",
       "      <td>111.595350</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>西藏自治区</th>\n",
       "      <td>1.545604</td>\n",
       "      <td>19.455248</td>\n",
       "      <td>151.871960</td>\n",
       "      <td>112.414820</td>\n",
       "      <td>60094.643275</td>\n",
       "      <td>115.168849</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>福建省</th>\n",
       "      <td>32.270201</td>\n",
       "      <td>281.517833</td>\n",
       "      <td>115.741251</td>\n",
       "      <td>109.484114</td>\n",
       "      <td>52346.286550</td>\n",
       "      <td>111.818485</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>重庆市</th>\n",
       "      <td>19.046848</td>\n",
       "      <td>175.014262</td>\n",
       "      <td>118.896551</td>\n",
       "      <td>109.847408</td>\n",
       "      <td>52280.444444</td>\n",
       "      <td>112.197467</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>山东省</th>\n",
       "      <td>59.890800</td>\n",
       "      <td>516.504774</td>\n",
       "      <td>115.532204</td>\n",
       "      <td>109.315069</td>\n",
       "      <td>50366.672515</td>\n",
       "      <td>111.728909</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>新疆维吾尔自治区</th>\n",
       "      <td>15.622043</td>\n",
       "      <td>149.894113</td>\n",
       "      <td>117.361640</td>\n",
       "      <td>108.999717</td>\n",
       "      <td>50234.625731</td>\n",
       "      <td>111.741010</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>四川省</th>\n",
       "      <td>37.544399</td>\n",
       "      <td>329.285017</td>\n",
       "      <td>120.184417</td>\n",
       "      <td>110.146496</td>\n",
       "      <td>49618.280702</td>\n",
       "      <td>112.860141</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>青海省</th>\n",
       "      <td>3.169238</td>\n",
       "      <td>30.063511</td>\n",
       "      <td>121.218436</td>\n",
       "      <td>109.326175</td>\n",
       "      <td>49264.678363</td>\n",
       "      <td>112.582032</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>宁夏回族自治区</th>\n",
       "      <td>3.628315</td>\n",
       "      <td>34.471454</td>\n",
       "      <td>113.437159</td>\n",
       "      <td>107.445127</td>\n",
       "      <td>49129.701754</td>\n",
       "      <td>110.016903</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>内蒙古自治区</th>\n",
       "      <td>14.651575</td>\n",
       "      <td>133.969182</td>\n",
       "      <td>114.551647</td>\n",
       "      <td>108.504456</td>\n",
       "      <td>47498.690058</td>\n",
       "      <td>111.055789</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>贵州省</th>\n",
       "      <td>14.550780</td>\n",
       "      <td>128.296406</td>\n",
       "      <td>120.547425</td>\n",
       "      <td>110.848650</td>\n",
       "      <td>47309.122807</td>\n",
       "      <td>113.251518</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>海南省</th>\n",
       "      <td>4.904139</td>\n",
       "      <td>40.987416</td>\n",
       "      <td>119.258447</td>\n",
       "      <td>110.336656</td>\n",
       "      <td>47224.847953</td>\n",
       "      <td>113.086880</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>陕西省</th>\n",
       "      <td>23.844242</td>\n",
       "      <td>207.536489</td>\n",
       "      <td>120.728505</td>\n",
       "      <td>108.119301</td>\n",
       "      <td>46612.181287</td>\n",
       "      <td>110.705069</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>安徽省</th>\n",
       "      <td>24.383643</td>\n",
       "      <td>209.033076</td>\n",
       "      <td>117.463836</td>\n",
       "      <td>108.645717</td>\n",
       "      <td>45770.783626</td>\n",
       "      <td>110.994596</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>湖北省</th>\n",
       "      <td>33.400080</td>\n",
       "      <td>276.362843</td>\n",
       "      <td>119.973649</td>\n",
       "      <td>110.831940</td>\n",
       "      <td>45400.081871</td>\n",
       "      <td>113.285320</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>辽宁省</th>\n",
       "      <td>30.751218</td>\n",
       "      <td>253.170818</td>\n",
       "      <td>111.427494</td>\n",
       "      <td>106.902471</td>\n",
       "      <td>45122.994152</td>\n",
       "      <td>109.378375</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>云南省</th>\n",
       "      <td>20.358667</td>\n",
       "      <td>162.590990</td>\n",
       "      <td>118.737238</td>\n",
       "      <td>110.580728</td>\n",
       "      <td>44699.356725</td>\n",
       "      <td>113.364179</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>湖南省</th>\n",
       "      <td>29.344616</td>\n",
       "      <td>228.883972</td>\n",
       "      <td>115.727061</td>\n",
       "      <td>109.355360</td>\n",
       "      <td>43279.467836</td>\n",
       "      <td>111.817440</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>广西壮族自治区</th>\n",
       "      <td>19.456787</td>\n",
       "      <td>150.990447</td>\n",
       "      <td>117.467780</td>\n",
       "      <td>109.088557</td>\n",
       "      <td>43223.590643</td>\n",
       "      <td>111.390122</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>河北省</th>\n",
       "      <td>31.146511</td>\n",
       "      <td>243.256919</td>\n",
       "      <td>114.395855</td>\n",
       "      <td>108.880748</td>\n",
       "      <td>42770.233918</td>\n",
       "      <td>111.209774</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>黑龙江省</th>\n",
       "      <td>23.720562</td>\n",
       "      <td>171.304693</td>\n",
       "      <td>111.402755</td>\n",
       "      <td>108.051331</td>\n",
       "      <td>42505.538012</td>\n",
       "      <td>110.681327</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>江西省</th>\n",
       "      <td>21.304642</td>\n",
       "      <td>164.671598</td>\n",
       "      <td>123.302839</td>\n",
       "      <td>111.145320</td>\n",
       "      <td>42360.959064</td>\n",
       "      <td>113.640221</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>甘肃省</th>\n",
       "      <td>12.288468</td>\n",
       "      <td>98.111795</td>\n",
       "      <td>119.733129</td>\n",
       "      <td>108.987128</td>\n",
       "      <td>40974.327485</td>\n",
       "      <td>111.754798</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>河南省</th>\n",
       "      <td>51.412716</td>\n",
       "      <td>368.740137</td>\n",
       "      <td>116.491033</td>\n",
       "      <td>107.431421</td>\n",
       "      <td>40797.461988</td>\n",
       "      <td>109.818486</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>吉林省</th>\n",
       "      <td>15.925829</td>\n",
       "      <td>126.015257</td>\n",
       "      <td>115.186699</td>\n",
       "      <td>108.585206</td>\n",
       "      <td>40642.450292</td>\n",
       "      <td>111.132482</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>山西省</th>\n",
       "      <td>22.464426</td>\n",
       "      <td>180.959399</td>\n",
       "      <td>114.410511</td>\n",
       "      <td>107.654083</td>\n",
       "      <td>40518.602339</td>\n",
       "      <td>110.050868</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "行业指标             人员      人员工资总额  人员工资总额指数(上年=100)  人员平均实际工资指数(上年=100)  \\\n",
       "地区                                                                      \n",
       "上海市       29.217498  506.729873        114.167000          107.737437   \n",
       "北京市       38.299189  653.921263        113.519823          108.038843   \n",
       "天津市       14.110606  176.701914        113.903208          108.390809   \n",
       "浙江省       53.427877  544.868658        114.136936          108.235843   \n",
       "广东省       84.940409  892.916516        118.186271          108.310723   \n",
       "江苏省       62.964261  665.158229        121.719647          109.055147   \n",
       "西藏自治区      1.545604   19.455248        151.871960          112.414820   \n",
       "福建省       32.270201  281.517833        115.741251          109.484114   \n",
       "重庆市       19.046848  175.014262        118.896551          109.847408   \n",
       "山东省       59.890800  516.504774        115.532204          109.315069   \n",
       "新疆维吾尔自治区  15.622043  149.894113        117.361640          108.999717   \n",
       "四川省       37.544399  329.285017        120.184417          110.146496   \n",
       "青海省        3.169238   30.063511        121.218436          109.326175   \n",
       "宁夏回族自治区    3.628315   34.471454        113.437159          107.445127   \n",
       "内蒙古自治区    14.651575  133.969182        114.551647          108.504456   \n",
       "贵州省       14.550780  128.296406        120.547425          110.848650   \n",
       "海南省        4.904139   40.987416        119.258447          110.336656   \n",
       "陕西省       23.844242  207.536489        120.728505          108.119301   \n",
       "安徽省       24.383643  209.033076        117.463836          108.645717   \n",
       "湖北省       33.400080  276.362843        119.973649          110.831940   \n",
       "辽宁省       30.751218  253.170818        111.427494          106.902471   \n",
       "云南省       20.358667  162.590990        118.737238          110.580728   \n",
       "湖南省       29.344616  228.883972        115.727061          109.355360   \n",
       "广西壮族自治区   19.456787  150.990447        117.467780          109.088557   \n",
       "河北省       31.146511  243.256919        114.395855          108.880748   \n",
       "黑龙江省      23.720562  171.304693        111.402755          108.051331   \n",
       "江西省       21.304642  164.671598        123.302839          111.145320   \n",
       "甘肃省       12.288468   98.111795        119.733129          108.987128   \n",
       "河南省       51.412716  368.740137        116.491033          107.431421   \n",
       "吉林省       15.925829  126.015257        115.186699          108.585206   \n",
       "山西省       22.464426  180.959399        114.410511          107.654083   \n",
       "\n",
       "行业指标            人员平均工资  人员平均货币工资指数(上年=100)  \n",
       "地区                                          \n",
       "上海市       95373.456140          110.225491  \n",
       "北京市       89086.046784          110.378292  \n",
       "天津市       73773.017544          110.858152  \n",
       "浙江省       66680.111111          110.637751  \n",
       "广东省       63142.736842          110.540402  \n",
       "江苏省       61104.783626          111.595350  \n",
       "西藏自治区     60094.643275          115.168849  \n",
       "福建省       52346.286550          111.818485  \n",
       "重庆市       52280.444444          112.197467  \n",
       "山东省       50366.672515          111.728909  \n",
       "新疆维吾尔自治区  50234.625731          111.741010  \n",
       "四川省       49618.280702          112.860141  \n",
       "青海省       49264.678363          112.582032  \n",
       "宁夏回族自治区   49129.701754          110.016903  \n",
       "内蒙古自治区    47498.690058          111.055789  \n",
       "贵州省       47309.122807          113.251518  \n",
       "海南省       47224.847953          113.086880  \n",
       "陕西省       46612.181287          110.705069  \n",
       "安徽省       45770.783626          110.994596  \n",
       "湖北省       45400.081871          113.285320  \n",
       "辽宁省       45122.994152          109.378375  \n",
       "云南省       44699.356725          113.364179  \n",
       "湖南省       43279.467836          111.817440  \n",
       "广西壮族自治区   43223.590643          111.390122  \n",
       "河北省       42770.233918          111.209774  \n",
       "黑龙江省      42505.538012          110.681327  \n",
       "江西省       42360.959064          113.640221  \n",
       "甘肃省       40974.327485          111.754798  \n",
       "河南省       40797.461988          109.818486  \n",
       "吉林省       40642.450292          111.132482  \n",
       "山西省       40518.602339          110.050868  "
      ]
     },
     "execution_count": 122,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df_就业切片_新.pivot_table(index='地区',columns='行业指标',values='数据').sort_values('人员平均工资',ascending=False)"
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.7.3"
  },
  "toc": {
   "base_numbering": 1,
   "nav_menu": {},
   "number_sections": true,
   "sideBar": true,
   "skip_h1_title": false,
   "title_cell": "Table of Contents",
   "title_sidebar": "Contents",
   "toc_cell": false,
   "toc_position": {},
   "toc_section_display": true,
   "toc_window_display": true
  }
 },
 "nbformat": 4,
 "nbformat_minor": 4
}
